Learn R Programming

spectrolab (version 0.0.18)

mean.spectra: Mean spectrum

Description

mean computes the arithmetic mean spectrum.

Usage

# S3 method for spectra
mean(x, na.rm = TRUE, keep_txt_meta = TRUE, ...)

Value

single spectrum

Arguments

x

spectra

na.rm

boolean. remove NAs? Defaults to TRUE

keep_txt_meta

try to keep text in the metadata

...

nothing

Author

Jose Eduardo Meireles

Examples

Run this code
library(spectrolab)
spec = as_spectra(spec_matrix_example, name_idx = 1)
mean(spec)

Run the code above in your browser using DataLab