[R] unique and precision of long integers
mherron at latte.harvard.edu
Mon May 14 17:09:21 CEST 2001
I have a dataset with about 500,000 observations, most of which are
not unique. The first 10 observations look like
Each digit reflects a separate field, but above all spaces are
I read in the data with scan(), and then use unique() to get the
unique observations. But, when I print these elements to a file I
lose precision. For instance, let x be a vector of the first 10
observations from the dataset:
> write (x,file="output",ncol=1)
Is there a way to get all the digits back?
> write (format(x,digits=22),file="output",ncol=1)
does not do it, and I cannot seem to increase digits >22.
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help