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