r if x = string code example
Example 1: check if column contains string in vector r
v <- c('a','b','c','e')
'b' %in% v
## returns TRUE
match('b',v)
## returns the first location of 'b', in this case: 2
Example 2: if string in r
grepl(value, chars, fixed = TRUE)
# TRUE