| summarize {ir} | R Documentation |
Summarize each group in a ir object to fewer rows
Description
Summarize each group in a ir object to fewer rows
Usage
summarize.ir(.data, ..., .groups = NULL)
summarise.ir(.data, ..., .groups = NULL)
Arguments
.data |
An object of class |
... |
< The value can be:
|
.groups |
When
In addition, a message informs you of that choice, unless the result is ungrouped,
the option "dplyr.summarise.inform" is set to |
Value
.data with summarized 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.
Source
See Also
Other tidyverse:
arrange.ir(),
distinct.ir(),
extract.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,
unite.ir()
Examples
## summarize
# select in each sample_type groups the first spectrum
ir_sample_data %>%
dplyr::group_by(sample_type) %>%
dplyr::summarize(spectra = spectra[[1]])