[R] re placePatterns() for multiple words replacement in tm

2009-08-11 Thread Kelvin Lam
Hi all, 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 sample[[1]]. sample[[1]] [1] abc def ghi change - c(abc,def)

Re: [R] re placePatterns() for multiple words replacement in tm

2009-08-11 Thread Bert Gunter
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Kelvin Lam Sent: Tuesday, August 11, 2009 9:43 AM To: r-help@r-project.org Subject: [R] re placePatterns() for multiple words replacement in tm Hi all, I wonder how you can replace all

Re: [R] re placePatterns() for multiple words replacement in tm

2009-08-11 Thread Kelvin Lam
Subject: [R] re placePatterns() for multiple words replacement in tm Hi all, 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