Skip to content

row.names - problem with vers. 1.4.1

1 message · Liaw, Andy

#
Your "problem" is not specific to 1.4.1, or even R.  read.table generates a
data frame, and data frame *must* have unique row names in all versions of R
and Splus (well, almost...).

If you don't need the row and column names, preprocess the file first.  If
you know the number of columns in the file, use scan() instead of
read.table.  It'll be much faster and memory efficient.  For example:

## strip out the first column
cmd <- paste("cut -d' ' -f2- ", path, "prices", date, ".txt", sep="")
prices <- matrix(scan(pipe(cmd), skip=1), byrow=TRUE, ncol=????)

HTH,
andy
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message.  If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it.

==============================================================================

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._