powered by
smooth runs each spectrum by a smoothing and returns the spectra
smooth
# S3 method for spectra smooth(x, method = "spline", ...)
spectra object. bands must be strictly increasing
Choose smoothing method: "spline" (default) or "moving_average"
additional parameters passed to smooth.spline or parameters `n` and `save_wvls_to_meta` for the moving average smoothing.
smooth.spline
a spectra object of with smoothed spectra
# NOT RUN { library(spectrolab) spec = as_spectra(spec_matrix_example, name_idx = 1) spec = smooth(spec, parallel = FALSE) # }
Run the code above in your browser using DataLab