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

overeem at knmi.nl overeem at knmi.nl
Tue Jun 13 16:01:25 CEST 2006


Full_Name: Aart Overeem
Version: 2.2.0
OS: Linux
Submission from: (NULL) (145.23.254.155)


Construct a dataframe consisting of several variables by using 'data.frame' and
'cbind' and write it to a file with 'write.table'. The file consists of headers
and values, such as 12.4283675334551 (so 13 numbers behind the decimal point).
If this dataframe is read with 'read.table(filename, skip = 1)' or
'read.table(filename, header = TRUE') the values only have 7 numbers behind the
decimal point, e.g. 12.42837. So, the reading rounds off the values. This is not
mentioned in the manual. Although the values still have many numbers behind the
decimal point, rounding off is, in my view, never desirable.



More information about the R-devel mailing list