Re: [R] stupid regexp question

2010-04-20 Thread servet ahmet çizmeli
Both methods solve my problem. Thanks a lot to Gabor and David! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

Re: [R] stupid regexp question

2010-04-19 Thread Gabor Grothendieck
Use fixed = TRUE to turn off interpretation of special characters: gsub("W.m^{-2}", "W/m2", "abc W.m^{-2} xyz", fixed = TRUE) 2010/4/19 servet ahmet çizmeli : > Hello, > > I have a stupid regexp question. I have a large data frame of strings. I would > like to convert all occurences of : > > "W.

Re: [R] stupid regexp question

2010-04-19 Thread David Winsemius
On Apr 19, 2010, at 11:39 AM, servet ahmet çizmeli wrote: Hello, I have a stupid regexp question. I have a large data frame of strings. I would like to convert all occurences of : "W.m^{-2}" to "W/m2" I make the following test : gsub(glob2rx("W.m^{-2}"), "W/m2", "W.m^{-2}") Two probl

[R] stupid regexp question

2010-04-19 Thread servet ahmet çizmeli
Hello, I have a stupid regexp question. I have a large data frame of strings. I would like to convert all occurences of : "W.m^{-2}" to "W/m2" I make the following test : gsub(glob2rx("W.m^{-2}"), "W/m2", "W.m^{-2}") but it does not seem to work. I don't know how to do it otherwise as I coul