| extract.ir {ir} | R Documentation |
Extract a character column in an ir object into multiple columns using regular expression groups
Description
Extract a character column in an ir object into multiple columns using regular expression groups
Usage
extract.ir(
data,
col,
into,
regex = "([[:alnum:]]+)",
remove = TRUE,
convert = FALSE,
...
)
Arguments
data |
An object of class |
col |
Column name or position. This is passed to
This argument is passed by expression and supports quasiquotation (you can unquote column names or column positions). |
into |
Names of new variables to create as character vector.
Use |
regex |
A string representing a regular expression used to extract the
desired values. There should be one group (defined by |
remove |
If |
convert |
If NB: this will cause string |
... |
Additional arguments passed on to methods. |
Value
data with an extracted character column. See
tidyr::extract().
Source
See Also
Other tidyverse:
arrange.ir(),
distinct.ir(),
filter-joins,
filter.ir(),
group_by,
mutate-joins,
mutate,
nest,
pivot_longer.ir(),
pivot_wider.ir(),
rename,
rowwise.ir(),
select.ir(),
separate.ir(),
separate_rows.ir(),
slice,
summarize,
unite.ir()
Examples
## extract
ir_sample_data %>%
tidyr::extract(
id_sample, "a"
)