Re: [R] How to convert "c:\a\b" to "c:/a/b"

From: David Duffy <David.Duffy_at_qimr.edu.au>
Date: Wed 29 Jun 2005 - 13:02:47 EST

I couldn't resist adding a more literal answer

unback <- function(x) {
  chars <- unlist(strsplit(deparse(x),""))   chars <- chars[-c(1,length(chars))]
  paste(gsub("\\\\","/",chars),collapse="") }

unback("\n")

| David Duffy (MBBS PhD) ,-_|\
| email: davidD@qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / *
| Epidemiology Unit, Queensland Institute of Medical Research \_,-._/
| 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG 4D0B994A v



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 29 13:11:13 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:06 EST