Reproducible Example
Table1
df <- data.frame(Name = c('hisas', 'myjafs', 'namegaefi'))
Name
1 hisas
2 myjafs
3 namegaefi
Table2
ref <- data.frame(Name = c('john', 'hello', 'his', 'name', 'random'))
Name
1 john
2 hello
3 his
4 name
5 random
Expected Output
Name Test
1 hisas T
2 myjafs F
3 namegaefi T
Question
I'm trying to use grepl to see if the string in table 2 can be found in table 1, and conditionally update a new column i. Test to reflect T or F
Failed Code
grepl(df$Name,ref$Name, fixed=TRUE)