[R] re placePatterns() for multiple words replacement in tm
lamkelf at gmail.com
Tue Aug 11 18:42:37 CEST 2009
I wonder how you can replace all words that need to be changed using
replacePatterns(). The following is my code. I want to replace both "abc"
and "def" to " Yes ". However, I can only replace the first occurrence in
 abc def ghi
> change <- c("abc","def")
> replacePatterns(sample[],change," Yes ")
 Yes def ghi
Thank you so much!!!!
View this message in context: http://www.nabble.com/replacePatterns%28%29-for-multiple-words-replacement-in-tm-tp24921281p24921281.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help