Re: [R] Replacing backslashes with slashes

From: Seth Falcon <>
Date: Thu 05 Jan 2006 - 05:32:50 EST

Hi Yvonnick,

On 4 Jan 2006, wrote:
> I am writing a GUI for R with the Rpad library. I have a "browse"
> button for data loading and Windows return a path string with
> backslashes. I need to convert them into slashes to use the string
> with read.table.

Can you provide some further detail on how the string is created? I'm not familiar with Rpad, but I wonder if the issue isn't at that level.

Note that if you create a string with single '\', R eats them up and at that point there is nothing you can do:

s <- "x\y\z"
[1] "xyz"

Do you have a way of printing your path string?

+ seth mailing list PLEASE do read the posting guide! Received on Thu Jan 05 07:17:09 2006

This archive was generated by hypermail 2.1.8 : Thu 05 Jan 2006 - 11:01:01 EST