Skip to content
Back to formatted view

Raw Message

Message-ID: <4EB3EA67.50707@yorku.ca>
Date: 2011-11-04T13:36:39Z
From: Michael Friendly
Subject: replace double backslash with singel backslash
In-Reply-To: <1320399335867-3989434.post@n4.nabble.com>

On 11/4/2011 5:35 AM, Kay Cichini wrote:
> 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 \
>

You may be able to avoid this simply by using forward slashes in path 
names. Otherwise,
?normalizePath
may help.


-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA