[R] Regular expression substitution ...

Roberto Brunelli roby.brunelli at gmail.com
Mon Nov 2 12:36:08 CET 2009


I would like to replace all occurences of

    /pc

with

   \%

using something like

sub("/pc", "\%", x)

but I am unable to make the '\' pass through.

Any hint?

Thanks,

Roberto




More information about the R-help mailing list