Untitled
DoesRandomStateContainLetter<-function(x){ x<-unlist(strsplit(x,"")) randomsamp<-strsplit(sample(state.name,1),"") sapply(x, function(x) any(grepl(x,randomsamp))) }
DoesRandomStateContainLetter<-function(x){ x<-unlist(strsplit(x,"")) randomsamp<-strsplit(sample(state.name,1),"") sapply(x, function(x) any(grepl(x,randomsamp))) }