Skip to content
Prev 1656 / 398506 Next

read.table

Zdenek Skala wrote:
You need to put the name of the file in quotes, i.e.
R> read.table("prum.txt")

If the argument is not in quotes then read.table expects the argument to
be an R "object". In this case, the object would be a string containing
the name of the file, so

R> myfile <- "prum.txt"
R> read.table(myfile)

would work too.
It is the working directory of R (normally the bin directory in the R
home tree, but you can change this by creating a shortcut and changing
the "Start in" field in the properties dialogue).

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