Skip to content
Prev 13828 / 398502 Next

read.table() suggestions

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