Skip to contents

ir_flatten takes and object of class ir, extracts the spectra column and combines the spectra into an object of class ir_flat. Metadata are not retained during flattening.

Usage

ir_flatten(x, measurement_id = as.character(seq_len(nrow(x))))

Arguments

x

An object of class ir.

measurement_id

A character vector an element for each row in x that contains the names to use as column names for the spectra in the ir_flat object to create.

Value

An object of class ir_flat.

Examples

x_flat <-
   ir::ir_sample_data %>%
   ir::ir_flatten()