? backslash was Re: [R] Editor alternative

Yves Gauvreau 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
that
> > some function require the use of "\\" and some don't. In the original
post
> > 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:"

platform Windows
arch     x86
os       Win32
system   x86, Win32
status
major    1
minor    1.0
year     2000
month    June
day      15
language R

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

So I apologize for my incomplete reply.

YG



>
> 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
function
> > and it as a legitimate purpose which we can't do without. Prof. Ripley
just
> > 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 mailing list