grepl.pattern <- function(united_state, targetPattern){
n <- length(targetPattern)
targetPattern.boolean <- sapply( 0:(n-1), function(i) shift( united_state == targetPattern[i+1],-i))
return( which( rowSums( targetPattern.boolean ) == n ) )
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.