I would like to use str_detect and not convert "" to another string pattern. Is there an easy way to deal with empty string patterns "" which right now generates a warning. I would like this to produce TRUE, FALSE, FALSE, FALSE, FALSE
library( tidyverse )
str_detect('matt', c( "matt","joe","liz","", NA))
str_detect(c( "matt","joe","liz","", NA), 'matt')if you really want the last element from output to beFALSEinstead ofNA, your input should bec( "matt","joe","liz","", "NA"), noteNAinside `"``