Intensities will be multiplied by the given factor.

normalize_factor(x, ...)

# S3 method for collection
normalize_factor(x, factors, skip = FALSE, ...)

Arguments

x

Acollection object

...

further arguments passed to or from other methods(not currenctly used).

factors

A tibble with columns id and factors

skip

Skip the creation of of processor step. If TRUE, this step will not be added to the list of processing steps. Typically reserved for nested function calls.

Value

An updated version of collection.

Details

Will mutliply the spectra by the factors given as arguments.

Missing ids will not be normalized

This method should be used to bucket new data based on the results from a previous dataset.

Examples

library(tidySpectR) library(tibble) ids <- pull_ids(fa_nmr) norm <- tibble(id = ids, factors = runif(length(ids))) normalize_factor(fa_nmr, norm)
#> Spectra collection containing 6 entries. #> Number of bins: 2250 #> Limits: -2.123166e-05 8.999979 #> Labels: conventional organic #> #> Processing: #> Step 1 / 1 : factor_normalization