Description Usage Arguments Value Examples
Extract the words from a text that match a regular expression.
1 | match_word(text.var, term.list, ...)
|
text.var |
The text string variable. |
term.list |
A list of named character vectors. |
... |
ignored. |
Returns a list of matched word vectors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | match_word(
text.var = c(
'the dog is todo them funny',
'I\'d wait to eat the sandwich.',
'the dog ate the sandwiches'
),
term.list = c('the', 'sandwich', 'do', '^do', '\\bdo', 'do$')
)
match_word(
text.var = c(
'the dog is todo them funny',
'I\'d wait to eat the sandwich.',
'the dog ate the sandwiches'
),
term.list = list(
'the',
'sandwich',
'do',
'^do',
'\\bdo',
'do$',
'\\b(eat|ate)\\b'
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.