Re: [R] Removing backslashes from data

2009-04-03 Thread Duncan Murdoch
On 4/3/2009 2:33 PM, Andrew Conway wrote: I am trying to check for backslashes in data, then remove them when I find them, but am having a difficult time figuring out the best way to do it. I know the backslash is the escape character in R, and I should be able to use 'gsub' to accomplish t

Re: [R] Removing backslashes from data

2009-04-03 Thread markleeds
Below works but it has two backslashes in the word. maybe someone can explain why the 4 and 2 works but 2 1 doesn't ? thanks. gsub("","","Hello\\World",perl=TRUE) On Apr 3, 2009, Andrew Conway wrote: I am trying to check for backslashes in data, then remove them when I

[R] Removing backslashes from data

2009-04-03 Thread Andrew Conway
I am trying to check for backslashes in data, then remove them when I find them, but am having a difficult time figuring out the best way to do it. I know the backslash is the escape character in R, and I should be able to use 'gsub' to accomplish this, but I all I seem to be getting are e