Dear R: This is a question from a beginner. I am using R for Windows and every time I try to load my data set, i. e., x <- data.frame (x), I receive the message "object x not found". How can I change my work directory? Thanks Rick. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010617/35ce6138/attachment.html
data.frame
4 messages · Ricardo Gonçalves, Kjetil Kjernsmo, Brian Ripley +1 more
On Sun, 17 Jun 2001, Ricardo Gon?alves wrote:
This is a question from a beginner. I am using R for Windows and every time I try to load my data set, i. e., x <- data.frame (x), I receive the message "object x not found". How can I change my work directory?
Eh, well, I don't know in Windows, but I've got a strong feeling that's
not really your problem. :-)
You see, if you don't have anything loaded that's called x, you need to
load it from disk. And if x is something that you have loaded, then it
seldom makes sense to run it through data.frame(x).
I think what you need is read.table()
For example:
x <- read.table("The-file-where-I-ve-got-my-data.dat")
Though I may have misunderstood completely your problem... :-)
Best,
Kjetil
Kjetil Kjernsmo Graduate astronomy-student Problems worthy of attack University of Oslo, Norway Prove their worth by hitting back E-mail: kjetikj at astro.uio.no - Piet Hein Homepage <URL:http://www.astro.uio.no/~kjetikj/> Webmaster at skepsis.no -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Sun, 17 Jun 2001, [iso-8859-1] Ricardo Gonçalves wrote:
Dear R: This is a question from a beginner. I am using R for Windows and every time I
try to load my data set, i. e., x <- data.frame (x), I receive the message "object x not found". Well, it won't be. That does not load a dataset. Try ?read.table, for example, or read the `R Data Import/Export Manual' (on the help menu).
How can I change my work directory?
See the rw-FAQ, question 5.2
Thanks Rick.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
At 01:41 PM 6/17/01 -0300, you wrote:
Dear R: <- data.frame (x), I receive the message “object x not found”. How can I change my work directory? ThanksRick.
setwd(dir) getwd() See help(setwd) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._