prospectr
Last update: 2026-05-31
Version: 0.2.9 – proxy
In science, one man’s noise is another man’s signal
prospectr provides tools for signal processing and
chemometrics, with a focus on pre-processing and sample selection of
spectral data. It is increasingly used in spectroscopic applications, as
reflected by the growing number of scientific publications citing the
package.
Although similar functions are available in other packages such as signal,
many functions in prospectr are designed to work
consistently with data.frame, matrix, and
vector inputs. Several functions are optimised for speed
and rely on C++ code through the Rcpp and
RcppArmadillo
packages.
The package includes three vignettes covering all major functionality:
prospectr
package: Overview, installation, and how to cite the
package.Signal processing:
movav(): moving average filtersavitzkyGolay(): Savitzky-Golay smoothing and
derivativesgapDer(): gap-segment derivativebaseline(): baseline removalcontinuumRemoval(): continuum-removed reflectance or
absorbancedetrend(): SNV-Detrend normalisationstandardNormalVariate(): Standard Normal Variate (SNV)
transformationmsc(): Multiplicative Scatter Correctionbinning(): average a signal in column binsresample(): resample a signal to new band
positionsresample2(): resample a signal using FWHM valuesblockScale(): block scalingblockNorm(): sum of squares block weightingCalibration sampling:
naes(): k-means samplingkenStone(): Kennard-Stone (CADEX) algorithmduplex(): DUPLEX algorithmshenkWest(): SELECT algorithmpuchwein(): Puchwein samplinghonigs(): sample selection by spectral subtractionOther utilities:
read_nircal(): read binary files from BUCHI NIRCal
softwarereadASD(): read binary or ASCII files from ASD
instrumentsspliceCorrection(): correct for detector splice steps
in ASD FieldSpec ProcochranTest(): detect replicate outliers with the
Cochran C testInstall from CRAN:
install.packages("prospectr")Or install the development version from GitHub:
# install.packages("remotes")
remotes::install_github("l-ramirez-lopez/prospectr")The package requires a C++ compiler. On Windows, install Rtools. On
macOS, you may need to install gfortran and
clang from CRAN tools.
citation(package = "prospectr")Contributions are welcome! Please read our Contributing Guidelines (available in the GitHub repo) before submitting pull requests.
This project follows a Code of Conduct available in the GitHub repo.
Report issues at GitHub or contact the maintainer (ramirez.lopez.leo@gmail.com).
resemble:
Memory-based learning and local modelling for spectral
chemometrics.