cloudspotter86 of epis_cps
7/6/2018 - 8:54 PM

Create variable by searching for pattern within another field

Create variable by searching for pattern within another field

# create var that is TRUE when "abcd" string present in disease_site
df$newvar = grepl("abcd", df$searchvar)