? backslash was Re: [R] Editor alternative

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed Sep 13 14:37:29 CEST 2000


"Yves Gauvreau" <cyg at sympatico.ca> writes:

> > > comply with it's path strings needs. Maybe it would be nice to just
> provide
> > > a simple function in "base" for the sole purpose of translating Windows
> path
> > > strings to the required form.
> >
> > I don't think, it is necessary. It is not so difficult to use "/" or
> > "\\" instead of "\" ...
> >
> > Uwe Ligges
> 
> I agree when you have a single path string to process it's ain't worth the
> trouble but what about situations where say you make use of a large number..

The real problem is that you cannot do this without changing the
syntax of R itself. The escape character modifies the character that
follows it, but is not itself part of the string. Contemplate the
following: 

> format("\a\b\c\d\e\f\g\h\'\"\n")
[1] "\\a\\bcde\\fgh'\\\"\\n"
> cat(format("\a\b\c\d\e\f\g\h\'\"\n"))
\a\bcde\fgh'\"\n> 
> "\a\b\c\d\e\f\g\h\'\"\n"  
[1] "\a\bcde\fgh'\"\n"
> cat("\a\b\c\d\e\f\g\h\'\"\n")
cdegh'"


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