Re: [R] Replace double slashes with single backslash

2020-12-28 Thread Anbu A
Thank you, Jim. That clarifies. I am trying to pass this path in a loop and read the files associated with the path. Yes the length is 26 where double quotes are counted as single quotes. Let me try to read the files using the collected path. Really appreciate it. Thanks, Anbu On Mon, Dec 28, 2

Re: [R] Replace double slashes with single backslash

2020-12-28 Thread jim holtman
Why do you want to replace '\\' with '\' in the file names? They are actually single '\' in the character string, but are printing out as '\\'. see example below: > x <- 'a\\b' > x [1] "a\\b" > nchar(x) [1] 3 Jim Holtman *Data Munger Guru* *What is the problem that you are

Re: [R] Replace double slashes with single backslash

2020-12-28 Thread Bert Gunter
"\" is an escape in R. See ?Quotes for details. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Dec 28, 2020 at 12:56 PM Anbu A wrote: > Hi All, > I am a