if a certain string then 1 in r code example Example: if string in r grepl(value, chars, fixed = TRUE) # TRUE