powered by
ir
Extract 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, ... )
An object of class ir.
Column name or position. This is passed to tidyselect::vars_pull().
tidyselect::vars_pull()
This argument is passed by expression and supports quasiquotation (you can unquote column names or column positions).
Names of new variables to create as character vector. Use NA to omit the variable in the output.
NA
A string representing a regular expression used to extract the desired values. There should be one group (defined by ()) for each element of into.
()
into
If TRUE, remove input column from output data frame.
TRUE
If TRUE, will run type.convert() with as.is = TRUE on new columns. This is useful if the component columns are integer, numeric or logical.
type.convert()
as.is = TRUE
NB: this will cause string "NA"s to be converted to NAs.
"NA"
Additional arguments passed on to methods.
data with an extracted character column. See tidyr::extract().
data
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()
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()
# NOT RUN { ## extract ir_sample_data %>% tidyr::extract( id_sample, "a" ) # }
Run the code above in your browser using DataLab