Description Usage Arguments Functions Note See Also Examples
View source: R/bind_re_match.R
Taking a data frame and a column name as input, this function will run
re_match
and bind the results as new columns to the original
table., returning a tibble
. This makes it friendly for
pipe-oriented programming with magrittr.
1 2 3 | bind_re_match(df, from, ..., keep_match = FALSE)
bind_re_match_(df, from, ..., keep_match = FALSE)
|
df |
A data frame. |
from |
Name of column to use as input for |
... |
Arguments (including |
keep_match |
Should the column |
bind_re_match_
: Standard-evaluation version that takes a quoted column name.
If named capture groups will result in multiple columns with the same
column name, repair_names
will be called on the
resulting table.
Standard-evaluation version bind_re_match_
that is
suitable for programming.
1 2 | match_cars <- tibble::rownames_to_column(mtcars)
bind_re_match(match_cars, rowname, "^(?<make>\\w+) ?(?<model>.+)?$")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.