[R] disabling scientific number format
David Croll
david.croll at gmx.ch
Wed Jun 16 08:59:32 CEST 2010
Hello R users,
I am a bit puzzled by the fact that
options(digits=22)
x0 <- 69880
y0 <- 26185
x1 <- 69600
y1 <- 22937
number <- paste(x0,y0,x1,y1,sep="")
number <- as.numeric(travel)
print(number)
gives number in scientific notation (some precision is wasted by having
a "e+19" at the tail):
6.988026185696e+19
but
print(exp(log(number)))
gives the full 20 digits of number (albeit with a certain error due to
the log() and exp() transformation):
69880261856959807488
How can I set print(number) to the normal notation instead of the
scientific one, or at least improve the precision of the scientific
notation?
Kind regards,
David
More information about the R-help
mailing list