[R] read.table() suggestions
David Larsen
dlarsen at sylvan.snr.missouri.edu
Wed Sep 26 19:30:52 CEST 2001
David Brahm wrote:
> Hi,
>
> I understand work is being done to improve read.table(), especially by
> Prof. Brian D. Ripley. I offer below a version that I wrote, in the
hope some
> aspects of it may prove useful or at least inspire discussion.
I have a read.table suggestion:
I find over the years, I forget many of the details about a data set so
I like to add comment statements to the file. I know that if the comments
are in the start of the file I can use skip but it is nice to be able to add
comments and have R ignore them.
I implemented this in the following crude way:
###############################################
read.table( ... , comment="#" )
# after the opening of file
system( paste( "sed '/^[\\", comment, "]/D' ", file, ">", tempname, sep
= ""))
file <- tempname
# continue processing file
###############################################
I would like see something like this added to the offiicial read.table
Dave Larsen
--
David Larsen E-mail: LarsenDR at missouri.edu
University of Missouri-Columbia Telephone: 573 882-4775
The School of Natural Resource FAX: 573 882-1977
203 Anheuser-Busch Natural Resources Building
Columbia, Missouri 65211 USA
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
mailing list