[R] read.table

Guido Masarotto guido at sirio.stat.unipd.it
Tue Dec 1 18:13:07 CET 1998


On Tue, Dec 01, 1998 at 03:01:16PM +0100, Zdenek Skala wrote:
> Sorry to all bothering you with a trivial question:
> I am using R (rw0630 for Win32) and am simply unable to read-in the *.txt data. 
> I've tried to copy the file (prum.txt) to different directories of rw0630 but get 
> uniformly the answer "object "prum.txt" not found". Which is the default 
> directory for read.table() ??


  read.table("c:\\Fryderyk\\Chopin\\prum.txt") #full path,
                                               #note the double slash
  or
  read.table("c:/Fryderyk/Chopin/prum.txt") #full path, Unix like name
  
  You can also give path relative to the current directory
  which is set by Windows using its convention, not by R,i.e.,
  1) if you launch R from a Windows command console
     c:\Amadeus\Mozart> ....rw06330\bin\R.exe <ret>
     you can use something like
     read.table("../../Fryderyk/Chopin/prum.txt")
     since "current directory"=c:\Amadeus\Mozart
  2) if you launch Rusing a short-cut "current directory"=../rw0630/bin
     or what you set in the property panel of the short-cut.
     
  g.     

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 mailing list