MyNixOS website logo
Description

Miscellaneous Functions for Processing and Sample Selection of Spectroscopic Data.

Functions to preprocess spectroscopic data and conduct (representative) sample selection/calibration sampling.

prospectr

CRAN_Status_Badge Downloads

Misc. Functions for Processing and Sample Selection of Spectroscopic Data

Antoine Stevens & Leo Ramirez-Lopez

Last update: 2024-02-16

Version: 0.2.7 – cakes

prospectr is becoming more and more used in spectroscopic applications, which is evidenced by the number of scientific publications citing the package. This package is very useful for signal processing and chemometrics in general as it provides various utilities for pre–processing and sample selection of spectral data. While similar functions are available in other packages, like signal, the functions in this package works indifferently for data.frame, matrix and vector inputs. Besides, several functions are optimized for speed and use C++ code through the Rcpp and RcppArmadillo packages.

Installing it from GitHub

Install this package from github by:

remotes::install_github("l-ramirez-lopez/prospectr")

NOTE: in some MAC Os it is still recommended to install gfortran and clang from here. Even for R >= 4.0. For more info, check this issue.

News

Check the NEWS document for new functionality and general changes in the package.

Vignette

A vignette for prospectr explaining its core functionality is available at https://CRAN.R-project.org/package=prospectr/vignettes/prospectr.html.

Core functionality

A vignette gives an overview of the main functions of the package. Just type vignette("prospectr-intro") in the console to access it. Currently, the following preprocessing functions are available:

  • resample() : resample a signal to new coordinates by linear or spline interpolation

  • resample2() : resample a signal to new coordinates using FWHM values

  • movav() : moving average

  • standardNormalVariate() : standard normal variate

  • msc() : multiplicative scatter correction

  • detrend() : detrend normalization

  • baseline() : baseline removal/correction

  • blockScale() : block scaling

  • blockNorm() : sum of squares block weighting

  • binning() : average in column–wise subsets

  • savitzkyGolay() : Savitzky-Golay filter (smoothing and derivatives)

  • gapDer() : gap-segment derivative

  • continuumRemoval() : continuum-removed absorbance or reflectance values

The selection of representative samples/observations for calibration of spectral models can be achieved with one of the following functions:

  • naes() : k-means sampling

  • kenStone() : CADEX (Kennard–Stone) algorithm

  • duplex() : DUPLEX algorithm

  • shenkWest() : SELECT algorithm

  • puchwein() : Puchwein sampling

  • honigs() : Unique-sample selection by spectral subtraction

Other useful functions are also available:

  • read_nircal() : read binary files exported from BUCHI NIRCal software

  • readASD() : read binary or text files from an ASD instrument (Indico Pro format)

  • spliceCorrection() : correct spectra for steps at the splice of detectors in an ASD FieldSpec Pro

  • cochranTest() : detects replicate outliers with the Cochran C test

Citing the package

Antoine Stevens and Leornardo Ramirez-Lopez (2024). An introduction to the prospectr package. R package Vignette R package version 0.2.4. A BibTeX entry for LaTeX users is:

 @Manual{stevens2024prospectr,
    title = {An introduction to the prospectr package},
    author = {Antoine Stevens and Leornardo Ramirez-Lopez},
    publication = {R package Vignette},
    year = {2024},
    note = {R package version 0.2.7},
  }

Bug report and development version

You can send an email to the package maintainer ([email protected]) or create an issue on github. To install the development version of prospectr, simply install devtools from CRAN then run install_github("l-ramirez-lopez/prospectr").

Metadata

Version

0.2.7

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows