r – Contains function

r – Contains function

You probably are looking for grepl:

string <- 12345REFUND4567
grepl(REFUND, string, fixed=TRUE)

[1] TRUE

r – Contains function

Leave a Reply

Your email address will not be published. Required fields are marked *