R-beta: Read_Table?
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Sat Apr 18 18:29:45 CEST 1998
Douglas Bates <bates at stat.wisc.edu> writes:
>
> Kryp33 <Kryp33 at aol.com> writes:
>
> > Can anybody help me with simple question, please? I have tried to input some
> > data to R and I use the read.table function. The exactly form that I type was:
> >
> > > test1 <- read.table("D:\Rstat\Work\Abt.data",header=T,sep=",")
> >
> > I've got the response from R:
> >
> > Error: "scan" can't open file
>
> R is having trouble with the file name. I think you may need to
> escape the backslashes in R strings. That is, you would write two
> backslashes in the file name wherever you have one now. It would look
> like
> read.table("D:\\Rstat\\Work\\Abt.data",header=T,sep=",")
That's right. Same as in e.g. Paradox, and other programs with C-style
string syntax. Rotating the backslashes 90 degrees ("D:/Rstat/...")
into UNIX style names also works.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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