Pattern matching using wildcards
x %like% pattern
character string containing the pattern to be matched
values to be matched
Only wildcards matching a single character '?' or zero or more
characters '*' are allowed. Matches are case-insensitive. The
pattern is first converted to a regular expression using
glob2rx then matched to values in
This is a shortcut for a commonly used expression found in the
subset example where
nm %in% grep("^M", nm,
value=TRUE) simplifies to
nm %like% 'M*'.
A logical vector indicating if there is a match or not. This will
mostly be useful in conjunction with the
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.