Learn R Programming

spectrolab (version 0.0.12)

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, ...)

Arguments

x

spectra

na.rm

boolean. remove NAs? Defaults to TRUE

keep_txt_meta

try to keep text in the metadata

...

nothing

Value

single spectrum

Examples

Run this code
# NOT RUN {
library(spectrolab)
spec = as_spectra(spec_matrix_example, name_idx = 1)
mean(spec)
# }

Run the code above in your browser using DataLab