nest | R Documentation |
ir
objectNest and un-nest an ir
object
nest.ir(.data, ..., .names_sep = NULL, .key = deprecated())
unnest.ir(
data,
cols,
...,
keep_empty = FALSE,
ptype = NULL,
names_sep = NULL,
names_repair = "check_unique",
.drop = deprecated(),
.id = deprecated(),
.sep = deprecated(),
.preserve = deprecated()
)
.data
with nested or unnested 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::nest()
Other tidyverse:
arrange.ir()
,
distinct.ir()
,
extract.ir()
,
filter-joins
,
filter.ir()
,
group_by
,
mutate
,
mutate-joins
,
pivot_longer.ir()
,
pivot_wider.ir()
,
rename
,
rowwise.ir()
,
select.ir()
,
separate.ir()
,
separate_rows.ir()
,
slice
,
summarize
,
unite.ir()
## nest
ir_sample_data |>
tidyr::nest(
contents = c(holocellulose, klason_lignin)
)
## unnest
ir_sample_data |>
tidyr::nest(
contents = c(holocellulose, klason_lignin)
) |>
tidyr::unnest("contents")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.