Skip to content
Prev 21058 / 63424 Next

undesirable rounding off due to 'read.table' (PR#8974)

On Tue, 2006-06-13 at 16:01 +0200, overeem at knmi.nl wrote:
You are asked not to report bugs on out-dated versions of R...
Works for me in R 2.3.1 (patched)

Are you mistaking the printed representation of your data.frame for the
real thing. E.g.:

# dummy data
dat <- as.data.frame(matrix(rnorm(100)+ 0.000000000000012, ncol = 10))
# not that reading/writing has anything to do with this, but just to
# prove it
write.table(dat, file = "~/tmp/temp.csv", sep = ",")
dat <- read.table("~/tmp/temp.csv", sep = ",", header = TRUE)
dat
options(digits = 14)
dat

or

print(dat, digits = 14)

G

Ps. Wasn't sure about the etiquette of replying to R-bugs in recipients,
so deleted it in case this caused further work for the maintainer(s) of
the bug repository. Sorry if this isn't desirable.