[Rd] system.file on Windows, / vs \\ (PR#586)

Prof Brian D Ripley ripley@stats.ox.ac.uk
Thu, 29 Jun 2000 18:03:17 +0100 (GMT Daylight Time)


On Thu, 29 Jun 2000 thomas@biostat.washington.edu wrote:

> 
> Under Windows, system.file() can return a path with both / and \\
> characters (R 1.0.0)
> eg
> > system.file("libs",pkg="modreg")
> "C:\\PROGRA~1\\R\\rw1000/library/modreg/libs"
> 
> This is fine when passed to R functions but not when passed to eg Tcl.

Yes, but the bug is in TCL, not R!  Such paths are valid paths on Windows,
with \ being preferred, but TCL does not accept paths containing \, which I
find pretty amazing.  I am not sure it handles drives properly, either.

In a few cases / or \ is required, so you will see gsub used quite
frequently in Windows R code.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._