extract.ir | R Documentation |
ir
object into multiple columns using regular expression groupsExtract a character column in an ir
object into multiple columns using regular expression groups
extract.ir( data, col, into, regex = "([[:alnum:]]+)", remove = TRUE, convert = FALSE, ... )
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. |
data
with an extracted character column. See
tidyr::extract()
.
tidyr::extract()
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()
## extract ir_sample_data %>% tidyr::extract( id_sample, "a" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.