One column of my data frame has words and phrases. I am trying to create a dummy variable for those fields within this column that have specific strings of text anywhere within.
For example:
- kite
- cars
- box kites
- model cars
- i like kites that fly
cars of the world
myvector<-c("kite","cars","box kites","model cars","i like kites that fly", "cars of the world")
I would want to identify all the fields with the string "kite"
I've tried a few things such as any(), which() and %in% but nothing has worked so far.
Any help greatly appreciated