[R] replace double backslash with singel backslash

Kay Cichini Kay.Cichini at uibk.ac.at
Fri Nov 4 10:35:35 CET 2011


I want to replace \\ with \ in:
str <-
"C:\\DOKUME~1\\u0327336\\LOKALE~1\\Temp\\RtmpQ5NJ8X\\TIRIS_PICS\\1_Img.jpg"

and tried:
gsub("\\\\", "\\", str)

but this removes the \\ without replacing them by \

Any help much appreciated,
Kay

-----
------------------------
Kay Cichini
Postgraduate student
Institute of Botany
Univ. of Innsbruck
------------------------

--
View this message in context: http://r.789695.n4.nabble.com/replace-double-backslash-with-singel-backslash-tp3989434p3989434.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list