hello!! i'm starting with R and i have some big problems:when i try to take
a notepad document (or word) i can't put it into R!!!!
i tried : read.table("nameofmyfile.dat") but it doesn't work!!!!!
my computer says:error in file(file, "r"): cannot open file
"nameofmyfile"
I think i have to save my notepad file on another location....can u help me?????
thank u very much
veerle bury
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
https://stat.ethz.ch/pipermail/r-help/attachments/20010202/7207213b/attachment.html
I assume you are using a windows machine.....You need to
specify exactly where you are reading your data from.
Suppose nameofmyfile.dat is on your A:\ drive, then you
might type:
eriksdata <- read.table("A:/nameofmyfile.dat")
On Fri, 2 Feb 2001 13:19:54 +0100 Erik Bury
<hans.bury at pandora.be> wrote:
> hello!! i'm starting with R and i have some big problems:when i try to
take a notepad document (or word) i can't put it into R!!!!
> i tried : read.table("nameofmyfile.dat") but it doesn't
work!!!!! my computer says:error in file(file, "r"): cannot open file
"nameofmyfile"
> I think i have to save my notepad file on another location....can u help
me?????
> thank u very much
> veerle bury
----------------------
Alan T. Arnholt
Associate Professor
Dept. of Mathematical Sciences
TEL: (828) 262-2863
FAX: (828) 265-8617
arnholt at math.appstate.edu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 13:19 02/02/01 +0100, you wrote:>>>>hello!! i'm starting with R and i have some big problems:when i try to take a notepad document (or word) i can't put it into R!!!! i tried : read.table("nameofmyfile.dat") but it doesn't work!!!!! my computer says:error in file(file, "r"): cannot open file "nameofmyfile" I think i have to save my notepad file on another location....can u help me????? thank u very much veerle bury This isn't such a big problem! You can change your working directory with setwd(), eg: setwd("c:/data/R") (note that you MUST use / and not \, even under Windows) To check what is the current working directory: getwd() Another possibility is that you give the path to your data file, eg: read.table("c:/where/my/data/live/nameofmyfile.dat") Finally, your data file must be saved in ASCII format. Emmanuel Paradis -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
You need to specify the abosulte path of the file. Otherwise R will assume your
file is in R_HOME/bin directory.
Ko-Kang Wang
----- Original Message -----
From: Erik Bury
To: R-help at lists.R-project.org
Sent: Saturday, February 03, 2001 1:19 AM
Subject: [R] R problem
hello!! i'm starting with R and i have some big problems:when i try to
take a notepad document (or word) i can't put it into R!!!!
i tried : read.table("nameofmyfile.dat") but it doesn't
work!!!!! my computer says:error in file(file, "r"): cannot open file
"nameofmyfile"
I think i have to save my notepad file on another location....can u help
me?????
thank u very much
veerle bury
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
https://stat.ethz.ch/pipermail/r-help/attachments/20010203/bda3d0e6/attachment.html