Applies a processing_step on a collection object

Process a collection object

Applies a processing_template on a collection object

# S3 method for processing_step
process(x, collection, ...)

process(...)

# S3 method for processing_template
process(x, collection, verbose = FALSE, ...)

Arguments

x

A processing_template object

collection

a collection to process

...

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

verbose

Set to TRUE to show progress

Examples

library(tidySpectR) # Creating a masking step stp <- processing_step( fun = mask, arglist = list(from = 5, to = Inf), type = "masking", name = "masking") process(stp, fa_nmr)
#> Spectra collection containing 6 entries. #> Number of bins: 1251 #> Limits: -2.123166e-05 5.003979 #> Labels: conventional organic #> #> Processing: #> Step 1 / 1 : mask
library(tidySpectR) template <- processing_template() %>% new_step(mask, list(from = 5, to = Inf), name = "mask") %>% new_step(bucket_uniform, list(N = 10), name = "bucket") process(template, fa_nmr)
#> Spectra collection containing 6 entries. #> Number of bins: 10 #> Limits: -2.123166e-05 5.003979 #> Labels: conventional organic #> #> Processing: #> Step 1 / 2 : mask #> Step 2 / 2 : uniform_binning