Hi! I got a rather stupid question (I think): Is there ANY option that makes R display numericals not like "1e-8" but as "0.00000001" by default ? And I need the outcome to be really numerical, so formatC(...) which produces a character or something like this won't be acceptable. Any help on this would be appreciated, thanx. Marc
suling at bips.uni-bremen.de wrote:> Hi! > I got a rather stupid question (I think): > > Is there ANY option that makes R display numericals not like > > "1e-8" > > but as > > "0.00000001" > > by default ?What about options(scipen=100) 1e-8 Uwe Ligges> And I need the outcome to be really numerical, so formatC(...) which produces a > character or something like this won't be acceptable. > > Any help on this would be appreciated, thanx. > > Marc > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Yep. That does the trick. Like I said, it was a rather stupid question... if you know the answer :-) Thank you, Uwe! Am 15 Nov 2005 um 15:47 hat Uwe Ligges geschrieben:> suling at bips.uni-bremen.de wrote: > > > Hi! > > I got a rather stupid question (I think): > > > > Is there ANY option that makes R display numericals not like > > > > "1e-8" > > > > but as > > > > "0.00000001" > > > > by default ? > > What about > > options(scipen=100) > 1e-8 > > > Uwe Ligges > > > > And I need the outcome to be really numerical, so formatC(...) which produces a > > character or something like this won't be acceptable. > > > > Any help on this would be appreciated, thanx. > > > > Marc > > > > ______________________________________________ > > R-help at stat.math.ethz.ch mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
Look at the scipen argument to options(). For example: > 0.00000001 [1] 1e-08 > options(scipen=10) > 0.00000001 [1] 0.00000001 suling at bips.uni-bremen.de wrote:> Hi! > I got a rather stupid question (I think): > > Is there ANY option that makes R display numericals not like > > "1e-8" > > but as > > "0.00000001" > > by default ? > > And I need the outcome to be really numerical, so formatC(...) which produces a > character or something like this won't be acceptable. > > Any help on this would be appreciated, thanx. > > Marc > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html-- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894