[R] Python's string translate in R?

Saptarshi Guha saptarshi.guha at gmail.com
Thu Oct 14 18:10:45 CEST 2010


Hello,

Would one use gsub to perform pythons translate?

in python

table = string.maketrans("abc","xyz")
"abc".translate(table)
"xyz"

how does one do this in R?

Thank you
Saptarshi



More information about the R-help mailing list