[R] replace double backslash with singel backslash

Kay Cichini
Fri, 04 Nov 2011 09:35:35 -0000

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.