There are words and phrases in one column of my data frame. I am trying to create a dummy variable for those fields inside this column that have specific lines of text anywhere.
For instance:
- kite
- cars
- box kites
- car models
- I like kites flying
cars of the world
myvector<-c("kite","cars","box kites","model cars","i like kites that fly", "cars of the world")
I would like to identify all fields with the string "kite"
I tried several things like any() , which() and %in% , but so far nothing has worked.
Any help is much appreciated
source share