? backslash was Re: [R] Editor alternative

Yves Gauvreau cyg at sympatico.ca
Wed Sep 13 15:21:45 CEST 2000

----- Original Message -----
From: "Duncan Murdoch" <dmurdoch at pair.com>
To: "Yves Gauvreau" <cyg at sympatico.ca>; <r-help at stat.math.ethz.ch>
Sent: Wednesday, September 13, 2000 8:38 AM
Subject: Re: ? backslash was Re: [R] Editor alternative

> On Wed, 13 Sep 2000 08:02:25 -0400, "Yves Gauvreau" <cyg at sympatico.ca>
> wrote:
> >I agree when you have a single path string to process it's ain't worth
> >trouble but what about situations where say you make use of a large
> >of Windows path string stored in a file or anywhere else and you want to
> >process each of the files the path string points to?
> In that case you don't need to double the backslash.  If you're
> reading character data from a file, R won't treat the backslashes as
> escape characters.  It's only the parser that does that.
> Duncan Murdoch

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

Live long and prosper.

Yves Gauvreau

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