Re: [R] Replacing backslashes with slashes

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

Hi Yvonnick,

On 4 Jan 2006, yvonnick.noel@uhb.fr 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"
s
[1] "xyz"

Do you have a way of printing your path string?

+ seth



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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