Calculates median of spectra

median_spectrum(x, ...)

# S3 method for collection
median_spectrum(x, group = "all", ...)

Arguments

x

Acollection object

...

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

group

How to perform grouping. Either allor labels

Value

An updated version of collection.

Examples

library(tidySpectR) median_spectrum(fa_nmr)
#> Spectra collection containing 1 entries. #> Number of bins: 2250 #> Limits: -2.123166e-05 8.999979 #> Labels: #> #> Processing:
median_spectrum(fa_nmr, group = 'labels')
#> Spectra collection containing 2 entries. #> Number of bins: 2250 #> Limits: -2.123166e-05 8.999979 #> Labels: #> #> Processing: