I have a dataframe with two columns:
Surname Email 1 house greghouse@gmail.com 2 wilson johnwatson@gmail.com
I want to cre
Here's a base R approach using mapply with grepl:
mapply
grepl
transform(df, CheckEmail = mapply(grepl, Surname, Email)) # Surname Email CheckEmail #1 house greghouse@gmail.com TRUE #2 wilson johnwatson@gmail.com FALSE