[Rd] feature request: comment character in read.table?
Ben Bolker
bolker@zoo.ufl.edu
Wed, 12 Sep 2001 12:30:19 -0400 (EDT)
How difficult would it be (I could try myself if someone thought it
would be straightforward) to change read.table to allow a comment
character such as # or %? My thought would be that anything on a line
following a comment character would be ignored (so that the combination of
blank.lines.skip=TRUE and a comment at the beginning of the line would
lead to a line being skipped completely).
I'm always encouraging my students to comment their data sets, and it
feels lame to tell them they have to count the number of initial lines in
the data set in order to set the "skip" parameter appropriately. (The
comment character would also allow comments about a particular data
point.)
I know I could hack this (a) with sed in Unix [but my students using
Windows are likely to have trouble] (b) within R, by processing the file
and creating a temporary file with comments deleted. (b) is probably what
I'll do as a temporary fix, but this seems to be a reasonable piece of
functionality for R to have ...
thoughts?
Ben Bolker
--
318 Carr Hall bolker@zoo.ufl.edu
Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker
Box 118525 (ph) 352-392-5697
Gainesville, FL 32611-8525 (fax) 352-392-3704
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._