meanfilter: Apply mean filter

Description Usage Arguments Value Author(s) See Also Examples

View source: R/speclib_smooth.R

Description

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

Usage

1

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

1
2
3
4
5
6
7
data(spectral_data)

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

  

hsdar documentation built on Dec. 14, 2017, 5:16 p.m.