? backslash was Re: [R] Editor alternative
cyg at sympatico.ca
Wed Sep 13 16:42:01 CEST 2000
----- Original Message -----
From: "Uwe Ligges" <ligges at statistik.uni-dortmund.de>
To: "Yves Gauvreau" <cyg at sympatico.ca>
Sent: Wednesday, September 13, 2000 10:19 AM
Subject: Re: ? backslash was Re: [R] Editor alternative
> > I'm not sure I understand what you mean in your last phrase. I noticed
> > some function require the use of "\\" and some don't. In the original
> > the path needed to be "corrected" and with assign (<-), read.table and
> > probably many more both "\" and "\\" work fine.
I should have added "work fine on:"
system x86, Win32
Under NT 4.0 read.table(file="d:\file.txt") &
read.table(file="d:\\file.txt") both work and your right if I go one or
more directory levels down it won't work. This is due I think, because at
the root level of a drive the operating system considers d:file.txt and
d:\file.txt to be equivalent. I think this originated far back with early
So I apologize for my incomplete reply.
> No, for example in read.table() "\" won't work:
> > read.table("c:\temp\test.txt")
> Error in count.fields(file, sep, quote, skip) :
> can't open file c: emp est.txt
> > I understand that the use of a single "\" is needed in several R
> > and it as a legitimate purpose which we can't do without. Prof. Ripley
> > replyed a solution that might put and end to this discussion. For those
> > cases (probably marginal) where "\\" or equivalent are needed we can use
> > what he suggested
> > "newpath <- gsub("\\", "/", oldpath) " and I hope every body should be
> > happy.
> > Live long and prosper.
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