I am trying to check if a string contains a particular number. Example:
mywords<- c("harry","met","sally","subway 10","1800Movies","2345")
If i want to check if the strings have the number "1", I am expecting to have the following as result:
FALSE FALSE FALSE TRUE TRUE FALSE
I was trying something with:
grepl("\\1", mywords)
but it works only for letters. Thank you everyone for your help.