Bucket a collection of spectra to a given bin width or number of bins

bucket_uniform(x, ...)

# S3 method for collection
bucket_uniform(x, width = NULL, N = NULL, skip = FALSE, ...)

Arguments

x

Acollection object

...

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

width

Bin width

N

Number of bins to create

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

Provide either width or N

Examples

library(tidySpectR) bucket_uniform(fa_nmr, width= 0.1)
#> Spectra collection containing 6 entries. #> Number of bins: 90 #> Limits: -2.123166e-05 8.999979 #> Labels: conventional organic #> #> Processing: #> Step 1 / 1 : uniform_binning
bucket_uniform(fa_nmr, N = 100)
#> Spectra collection containing 6 entries. #> Number of bins: 100 #> Limits: -2.123166e-05 8.999979 #> Labels: conventional organic #> #> Processing: #> Step 1 / 1 : uniform_binning