Learn R Programming

hsdar (version 0.5.1)

meanfilter: Apply mean filter

Description

Apply mean filter to data frame with spectra as rows and bands as columns. Filter size is passed as number of bands averaged at both sites of the respective band value.

Usage

meanfilter(spectra, p = 5)

Arguments

spectra
Data frame containing spectra
p
Filter size.

Value

Filtered data frame of same dimension as input data frame

See Also

smoothSpeclib

Examples

Run this code
data(spectral_data)

spectra_filtered <- meanfilter(spectra(spectral_data), p = 10)
spectra(spectral_data) <- spectra_filtered 

  

Run the code above in your browser using DataLab