Grepl | R Documentation |
Judge for Included Character
Grepl(pattern, x)
pattern |
one or more vectors |
x |
one or more vectors |
'
a matrix with logical words
a=c('abcd','agj','abcu')
# Grepl for one vector
pat1='b'
Grepl(pat1,a)
# Grepl for two vectors
pat2=c('c','d')
Grepl(pat2,a)
# use %or% in pattern
pat3=c('a%or%c','d')
Grepl(pat3,a)
# use %and% in pattern
pat4=c('a%and%c','d')
Grepl(pat4,a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.