From ripley@stats.ox.ac.uk  Thu Jun 29 18:03:17 2000
From: ripley@stats.ox.ac.uk (Prof Brian D Ripley)
Date: Thu, 29 Jun 2000 18:03:17 +0100 (GMT Daylight Time)
Subject: [Rd] system.file on Windows, / vs \\ (PR#586)
In-Reply-To: <200006291649.SAA21319@pubhealth.ku.dk>
Message-ID: <Pine.WNT.4.05.10006291756380.337-100000@tern.stats>

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


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