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? Thanks in advance. Samir. _______________________________________________________ Send a cool gift with your E-Card http://www.bluemountain.com/giftcenter/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dinil Penne <pennedinil at excite.com> writes:> 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?file.path() maybe? -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._