[R] stupid regexp question

servet ahmet çizmeli sa.cizmeli at usherbrooke.ca
Mon Apr 19 17:39:43 CEST 2010


I have a stupid regexp question. I have a large data frame of strings. I would
like to convert all occurences of :




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 could
never learn how to deal with the special characters (like .^{}) in regexps.

Thanks from advance for your kindly help

More information about the R-help mailing list