Description Usage Arguments Value Examples
Returns a logical indicating whether input strings were matched by one or more patterns
1 2 3 4 5 6 7 8 |
x |
a character vector to unglue. |
patterns |
a character vector or a list of character vectors, if a list,
items will be pasted using an empty separator ( |
open |
The opening delimiter. |
close |
The closing delimiter. |
convert |
If |
multiple |
The aggregation function to use if several subpatterns are
named the same, by default no function is used and subpatterns named the
same will match the same value. If a function is provided it will be fed
the conflicting values as separate arguments. Formula notation
is supported if the package |
a vector of logical.
1 2 3 4 | sentences <- c("666 is [a number]", "foo is [a word]",
"42 is [the answer]", "Area 51 is [unmatched]")
patterns <- c("{number=\\d+} is [{what}]", "{word=\\D+} is [{what}]")
unglue_detect(sentences, patterns)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.