Description Usage Arguments Examples
This function extracts the first group of regex from a vector
1 |
data |
a vector of char objects |
regex |
character containing regular expression(s) with a group in it |
1 2 3 | extract_field('hello_23_node', '(\\d+)') # '23'
extract_field(c('all-2', 'any-3', 'never-4-d'), '(\\d+)') # a vector c('2', '3', '4')
extract_field(c('all-2', 'any+3', 'never+4'), '\\+(\\d+)') # a vector c(NA, '3', '4')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.