if condition with string in r code example
Example 1: if string in r
grepl(value, chars, fixed = TRUE)
# TRUE
Example 2: if in r
if (test_expression) {
statement
}
grepl(value, chars, fixed = TRUE)
# TRUE
if (test_expression) {
statement
}