Bucket a collection of spectra using the Optimized Bucketting Algorithm

bucket_optimized(x, ...)

# S3 method for collection
bucket_optimized(x, initial_width, slackness, skip = FALSE, ...)

Arguments

x

Acollection object

...

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

initial_width

Initial bin width to optimize

slackness

fraction of initial width that defines how far the boundary can move while searching for a local minimum

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

The Optimized Bucketting Algorithm optimizes bucket size by searching local minima in the average spectrum.

References

Sousa SAA, Magalhaes A, Ferreira MMC. Optimized bucketing for NMR spectra: Three case studies. Chemometr Intell Lab. 2013;122:93–102. https://doi.org/10.1016/j.chemolab.2013.01.006 https://doi.org/10.1016/j.chemolab.2013.01.006

Examples

library(tidySpectR) bucket_optimized(fa_nmr, initial_width = 0.1, slackness = 0.2)
#> Spectra collection containing 6 entries. #> Number of bins: 244 #> Limits: -2.123166e-05 8.999979 #> Labels: conventional organic #> #> Processing: #> Step 1 / 1 : optimized_binning