How will you check if an element is present in a vector in R match() code example
Example: 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