ir_new_ir {ir} | R Documentation |
Creates an object of class ir
Description
ir_new_ir
is the constructor function for objects of class
ir
.
An object of class ir
is a tibble::tbl_df()
with a
sample in each row and a list column containing spectra for each sample.
Usage
ir_new_ir(spectra, metadata = tibble::tibble())
Arguments
spectra |
A named list in which each element contains spectral data
for one measurement. Each list element must be a |
metadata |
An optional |
Value
An object of class ir
with the following columns:
- spectra
A list column identical to
spectra
.- ...
Additional columns contained in
metadata
.
Examples
ir_new_ir(
spectra = ir_sample_data$spectra,
metadata = ir_sample_data %>% dplyr::select(-spectra)
)