R-beta: R-beta Win95 read.table

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed Jul 15 00:21:41 CEST 1998


"Peter B. Mandeville" <mandevip at deimos.tc.uaslp.mx> writes:

> 
> For 
> 	dat <- read.table("c:\claims.dat",header=T)
> R version 0.62 Beta (june 9, 1998)for Windows 95 reports
> 	Error: "scan" can't open file
> but
> 	dat <- read.table("c:\\claims.dat",header=T)
> works.
> 

Yes. This is a consequence of R's (C-style) string handling in
general. '\' is an escape character, so that you e.g. can enter a
newline as "\n". When you really need a '\', you have to escape it
with another '\'. In filenames, you can also rotate it 90 degrees
("c:/claims.dat")

-- 
   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