[R] question about scan()
maeder at atmos.umnw.ethz.ch
Wed May 15 10:22:25 CEST 2002
it looks you using R1.4.X
in this case you have to add comment.char = "" to your scan command,
because '#' is used to mark comments. In R1.5.0 "" is the default (that
means: no comments allowed), which is the better option beacause there
are many different comment chars in tht different file types.
joshi at engr.orst.edu wrote:
> I am using the scan function to read from a file. In
> general the syntax I am using is as follows:
> scan("myfile", list(a = "", b="", c="", d=""), sep=",")
> The file I am trying to read contains a #< in the 'd'
> field. When the file is read into an object, the d
> field comes as "" for that particular string.
> I guess the problem is because the # is used for
> My question is that if I want to read the #< anyways
> from the file, how do I do that?
> Thanks in advance.
> 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
Joerg Maeder .:|:||:..:.||.:: maeder at atmos.umnw.ethz.ch
Tel: +41 1 633 36 25 .:|:||:..:.||.::
PhD student at INSTITUTE FOR ATMOSPHERIC AND CLIMATE SCIENCE (IACETH)
ETH ZÜRICH Switzerland
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