Windows <--> UNIX File Conversion
On Tue, 12 Dec 2000, Dinil Penne wrote:
I thought I'd field this question in case someone has already done this,
before proceeding with trying to develop a function on my own.
I'm generating a number of files and to keep track of them, I'm also
outputting the names of these files to external files & datasets. Depending
on the platform I'm working on, Windows or Unix, i'd like to be able to
switch between UNIX filenames (with the "/") and Windows filenames ("\").
Does someone already have a function to do this?
It's fairly easy using gsub()
gsub("/","\\\\",x)
replaces "/" by "\\". but it's usually unnecessary. The Unix filenames
work under Windows.
-thomas
Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._