| separate.ir | R Documentation |
ir object into multiple columns with a regular expression or numeric locationsSeparate a character column in an ir object into multiple columns with a regular expression or numeric locations
separate.ir(
data,
col,
into,
sep = "[^[:alnum:]]+",
remove = TRUE,
convert = FALSE,
extra = "warn",
fill = "warn",
...
)
data |
An object of class |
col |
< |
into |
Names of new variables to create as character vector.
Use |
sep |
Separator between columns. If character, If numeric, |
remove |
If |
convert |
If NB: this will cause string |
extra |
If
|
fill |
If
|
... |
Additional arguments passed on to methods. |
.data with separated columns. If the spectra column is
dropped or invalidated (see ir_new_ir()), the ir class is dropped, else
the object is of class ir.
tidyr::separate()
Other tidyverse:
arrange.ir(),
distinct.ir(),
extract.ir(),
filter-joins,
filter.ir(),
group_by,
mutate,
mutate-joins,
nest,
pivot_longer.ir(),
pivot_wider.ir(),
rename,
rowwise.ir(),
select.ir(),
separate_rows.ir(),
slice,
summarize,
unite.ir()
## separate
ir_sample_data |>
tidyr::separate(
col = "id_sample", c("a", "b", "c")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.