powered by
gsub
multigsub(pattern, replacement = NULL, text.var, leadspace = FALSE, trailspace = FALSE, fixed = TRUE, ...) mgsub(pattern, replacement = NULL, text.var, leadspace = FALSE, trailspace = FALSE, fixed = TRUE, ...)
multigsub(c("it's", "I'm"), c("it is", "I am"), DATA$state) mgsub(c("it's", "I'm"), c("it is", "I am"), DATA$state) mgsub("[[:punct:]]", "PUNC", DATA$state, fixed = FALSE)
Run the code above in your browser using DataLab