Skip to content

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

2 messages · Thomas Lumley, Brian Ripley

#
Under Windows, system.file() can return a path with both / and \\
characters (R 1.0.0)
eg
"C:\\PROGRA~1\\R\\rw1000/library/modreg/libs"

This is fine when passed to R functions but not when passed to eg Tcl.

	-thomas


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Thu, 29 Jun 2000 thomas@biostat.washington.edu wrote:

            
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.