[R] substitution of the ASCII character "squared" AKA "^2" AKA (alt+0178) with a tractable one
ottorino
ottorino-luca.pantani at unifi.it
Tue Apr 10 16:00:59 CEST 2012
Il giorno mar, 10/04/2012 alle 09.54 -0400, David Winsemius ha scritto:
> Perhaps, modulo encoding issues I'm not expert in, one more
> backslash
> than you tried:
>
> > gsub( "\\\xb2" , "2",
> "(MPa)\t(mm3)\t(nM)\t(mm3/g)\t(mm3/g)\t(%)\t(m
> \xb2/g)\t")
> [1] "(MPa)\t(mm3)\t(nM)\t(mm3/g)\t(mm3/g)\t(%)\t(m2/g)\t"
Invaluable help, David.
But now I'm REALLY discouraged from the solution !! :-(
THANKS A LOT !!
8rino
More information about the R-help
mailing list