On 08/02/2011 8:19 AM, George Pantop wrote:
Hello!
I have just uninstalled the R 2.4.1 that i was using and installed the latest 
version (R 2.12.1).
In order to read a text file, i was copying the text file to C/Program 
Files/R/R 2.4.1, and the previous version was able to read it from there.

I did the same think for the new version (copy text file to C/Program Files/R/R 
2.12.1) and i tried to open it:

data<- read.table('intersand.txt')

but the result was:

Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
   cannot open file 'intersand.txt': No such file or directory

Can someone tell me what the problem is? Must i copy the text file somewhere 
else?


Use

setwd(choose.dir())

to set the current working directory wherever your file is, then you'll be able to read it. Or use

read.table(file.choose())

to find the file and read it from wherever it was sitting.

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to