Re: [R] R grep & gsub issue - sign seems to be causing an issue...

2009-03-12 Thread Prof Brian Ripley
On Thu, 12 Mar 2009, Duncan Murdoch wrote: Jason Rupert wrote: I would like to use grep and gsub to manipulate a vector to make the names used consistent, i.e. reduce a level or two. This is dangerous: grep and gsub use regular expressions, so a lot of characters (see ?regexp for the list)

Re: [R] R grep & gsub issue - sign seems to be causing an issue...

2009-03-12 Thread Duncan Murdoch
Jason Rupert wrote: I would like to use grep and gsub to manipulate a vector to make the names used consistent, i.e. reduce a level or two. This is dangerous: grep and gsub use regular expressions, so a lot of characters (see ?regexp for the list) have special meanings. For the kind of

[R] R grep & gsub issue - sign seems to be causing an issue...

2009-03-12 Thread Jason Rupert
I would like to use grep and gsub to manipulate a vector to make the names used consistent, i.e. reduce a level or two. However, here is what I found when I attempted to use grep and gsub: > tmp_test<-c("House 1 Plot Plus +100","House 2 Plot Plus +100","House 3 Plot > Plus -100","House 4