Witold Eryk Wolski
2001-Jan-05 09:11 UTC
[R] By which function I can limit the precision of numbers??
Hi! I want to plot some numerical results in a graphic. I use the function text(x,y, result). What i want is to limit the precision of the numbers stored in result to 2 decimal places for layout reasons. How to do it?? thx Witek -- Witold Eryk Wolski Max Plank Institut fuer Molekulare Genetik Ihnestr73 14195 Berlin Germany tel.: Work 0049-30-84131426 http://www.molgen.mpg.de/~wolski -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Uwe Ligges
2001-Jan-05 09:34 UTC
[R] By which function I can limit the precision of numbers??
Witold Eryk Wolski wrote:> > Hi! > I want to plot some numerical results in a graphic. I use the function > text(x,y, result). > What i want is to limit the precision of the numbers stored in result to > 2 decimal places for layout reasons. How to do it?? > thx Witektext(x, y, round(result, 2)) Uwe -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Witold Eryk Wolski
2001-Jan-05 10:11 UTC
[R] By which function I can limit the precision of numbers??
THX for fast help. Eryk "Richards, Tom" wrote:> Try round() and signif() functions. I think, > > text(x,y,as.character(round(result,2))) > > will work, or try signif, also. > > Tom > > > -----Original Message----- > > From: Witold Eryk Wolski [mailto:wolski at molgen.mpg.de] > > Sent: Friday, January 05, 2001 4:12 AM > > To: R-help > > Subject: [R] By which function I can limit the precision of numbers?? > > > > > > Hi! > > I want to plot some numerical results in a graphic. I use the function > > text(x,y, result). > > What i want is to limit the precision of the numbers stored > > in result to > > 2 decimal places for layout reasons. How to do it?? > > thx Witek > > > > > > -- > > Witold Eryk Wolski > > Max Plank Institut fuer Molekulare Genetik > > Ihnestr73 14195 Berlin > > Germany > > tel.: > > Work 0049-30-84131426 > > http://www.molgen.mpg.de/~wolski > > > > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > > -.-.-.-.-.-.-.-.- > > r-help mailing list -- Read > > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > > Send "info", "help", or "[un]subscribe" > > (in the "body", not the subject !) To: > > r-help-request at stat.math.ethz.ch > > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. > > _._._._._._._._._ > >-- Witold Eryk Wolski Max Plank Institut fuer Molekulare Genetik Ihnestr73 14195 Berlin Germany tel.: Work 0049-30-84131426 http://www.molgen.mpg.de/~wolski -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Emmanuel Paradis
2001-Jan-05 12:03 UTC
[R] By which function I can limit the precision of numbers??
At 10:11 05/01/01 +0100, you wrote:>Hi! >I want to plot some numerical results in a graphic. I use the function >text(x,y, result). >What i want is to limit the precision of the numbers stored in result to >2 decimal places for layout reasons. How to do it?? >thx WitekUse the function round(), e.g.:> pi[1] 3,141593> round(pi, 2)[1] 3,14 EP -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._