Hello list,

I'm just getting started with R, and I'm trying to determine how R
treats large numbers that have decimals.  Take the following two examples:

> x <- c(999999999999999.9)
> sprintf("%.5f",x)
[1] "999999999999999.87000"

> y <- c(9999999999999999.9)
> sprintf("%.5f",y)
[1] "10000000000000000.00000"

I realize that I have no idea what I'm doing as far as using R is
concerned, but maybe someone can tell me what would be the best way to
input/output numbers such that they don't get rounded off in unexpected
ways.  I've been searching online and looking through various R manuals,
but I haven't found anything that really clarifies this so far...

Thanks in advance for any advice,

Mike

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to