Untitled

 avatar
unknown
plain_text
2 years ago
205 B
3
Indexable
DoesRandomStateContainLetter<-function(x){   x<-unlist(strsplit(x,""))   randomsamp<-strsplit(sample(state.name,1),"")   sapply(x, function(x) any(grepl(x,randomsamp))) } DoesRandomStateContainLetter("as")
Editor is loading...