Skip to content
Prev 300635 / 398506 Next

Removing values from a string

There are a couple of ambiguities in your request, but this should get
you started:
keyword
1                 auto
2 auto|insurance|quote
3       auto|insurance
4            insurance
5       auto|insurance
6                 <NA>

Note that this won't remove values that are actually NA, as in row 6.
Also note that your keyword values are factors rather than character
strings. You may well want to add stringsAsFactors=FALSE to your
data.frame() command.

Sarah
On Thu, Jul 19, 2012 at 3:21 PM, Abraham Mathew <abmathewks at gmail.com> wrote: