meanfilter: Apply mean filter

View source: R/speclib_smooth.R

meanfilterR Documentation

Apply mean filter

Description

Apply mean filter to spectra. Filter size is passed as number of bands averaged at both sides of the respective band value.

Usage

meanfilter(spectra, p = 5)

Arguments

spectra

Data.frame, matrix or Speclib containing spectra

p

Filter size.

Value

Filtered matrix or Speclib of same dimension as input matrix/Speclib

Author(s)

Lukas Lehnert

See Also

noiseFiltering

Examples

data(spectral_data)

spectra_filtered <- meanfilter(spectral_data, p = 10)
plot(spectra_filtered[1,])
plot(spectral_data[1,], new = FALSE)

  

hsdar documentation built on March 18, 2022, 6:35 p.m.