Skip to content

specProc

0.8.3Package record

Preprocessing Tools for Laser-Induced Breakdown Spectroscopy

0packages depend
130downloads / year
90.5%test coverage
12/12flavors OK

Overview

About

Tools for exploring, preprocessing and modeling spectroscopic data, developed for laser-induced breakdown spectroscopy (LIBS) and also applicable to other techniques such as Raman, infrared, and inductively coupled plasma optical emission spectroscopy. Covers the workflow from raw spectra to calibrated results: peak finding and fitting, wavelength calibration, baseline correction, normalization and scaling, orthogonal signal correction including orthogonal partial least squares (OPLS; Trygg and Wold (2002) doi:10.1002/cem.695), calibration transfer, calibration curves and figures of merit, and plasma diagnostics (Boltzmann and Saha-Boltzmann plots, Stark broadening). Includes robust tools for outlier detection and exploration: robust principal component analysis (Hubert, Rousseeuw and Vanden Branden (2005) doi:10.1198/004017004000000563), detection of deviating cells (Rousseeuw and Van den Bossche (2018) doi:10.1080/00401706.2017.1340909), PCA with cellwise outliers and missing values (MacroPCA; Hubert, Rousseeuw and Van den Bossche (2019) doi:10.1080/00401706.2018.1562989), robust transformations to central normality (Raymaekers and Rousseeuw (2021) doi:10.1007/s10994-021-05960-5), and self-organizing maps (Kohonen (1982) doi:10.1007/BF00337288). Preprocessing steps are also available as 'recipes' steps for 'tidymodels' workflows. Computationally intensive steps are implemented in 'C++' via 'Rcpp' and 'RcppEigen'.

Changes in 0.8.3

New features

  • cellpca(): robust PCA by casewise and cellwise weighting (cellPCA, Centofanti, Hubert and Rousseeuw). It handles outlying observations, outlying cells and missing values by minimizing a single objective, with weights between 0 and 1 for every cell and observation. The iteratively reweighted least squares and the predictions of new data are computed in C++; the results agree with the reference code of the authors to numerical precision. predict(), plot_outlier_map() (enhanced outlier map), plot_cell_map() and flagged_regions() accept its fits, and step_cellpca() is its recipe step.

Breaking changes

  • The detection of deviating cells (DDC) behind macropca() and cellpca() now follows the DDC algorithm of the cellWise package: 1-step M estimators for the standardization and the residual scales, the robust Gnanadesikan-Kettenring correlations for the neighbors (wrapped correlations, found exactly, for more than 750 variables), robust slopes refined by least squares, each cell included in its own prediction, and the standalone variables. It flags the same cells as cellWise, and more of the outlying cells with far fewer false flags than before.
Show all changes in 0.8.3Hide the rest of the changes in 0.8.3
  • macropca() now follows the MacroPCA algorithm of Hubert, Rousseeuw and Van den Bossche (2019), built on ROBPCA, as implemented in cellWise, whose results it reproduces (with scale = FALSE): projection pursuit on the data where only the observations with the fewest flagged cells are cell-imputed, iterative subspace estimation on a fixed set of observations, one reweighting step on the orthogonal distances, concentration steps and the deterministic MCD within the subspace, and distances from the data with only the missing cells imputed. New data are analyzed as by MacroPCApredict (with the DDC model of the fit). Its results change. tol is now the largest angle between successive subspaces as a fraction of a right angle (default 0.005, as in the paper), the cut-offs of the score and orthogonal distances are at the 99% level as in the paper, the residual scales are 1-step M scales, and the fit returns the observations set aside by DDC (flagged_rows).

Bug fixes

  • baseline_lsp() uses the improved modified polynomial fit (IModPoly) of Zhao et al. (2007) by default (method = "imodpoly"). The modified polynomial fit of Lieber and Mahadevan-Jansen (2003), still available with method = "modpoly", is pulled up by strong lines, and its baseline could then fall far below the background at the ends of the spectrum (for example above 290 nm in the 240-300 nm window of the forageLIBS spectra). The default max.iter is now 100.

Dependencies

  • ggsci, prospectr and XICOR move from Imports to Suggests. generalized_boxplot() uses the default ggplot2 palette when ggsci is not installed, and correlation(method = "chatterjee") asks for XICOR. y_gradient_glsw() computes its Savitzky-Golay derivatives with the package's own filter (same results).
  • mt is no longer suggested.
  • Every step_*() function checks that recipes is installed.

Documentation

  • Examples for the help pages that had none (the step_*() functions, predict() methods, reject_shots(), pds(), robust_bcyj(), umad(), the wavelength calibration helpers and the tuning parameters).
  • The rospca() example runs on a spectral window, and the plot_loadings() example that queries the NIST database is run with \donttest and try().
  • The package description covers the whole workflow, with references.
  • Non-ASCII mathematical symbols removed from the help pages.

From NEWS.md in the release

Install

Health

CRAN checks
12OK
Slowest check: 16.1 min · r-release-macos-x86_64
Status changes
  • OK12 OKNow
  • OK6 OK2026-10-16
Advisories

none known

Documentation

In release 0.8.3
READMEYes · 375 wordsVignettesYes · 4 · dynamicNEWSYes · 100% structured · mentions 0.8.3Citation fileNoWebsiteYes · pkgdown
Help pages
141 (3 internal)includes a package overview page
Examples that run
93%129 run in a plain check (30 of them under a condition) · 9 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
98%
Documented parameters
98%
Return-value docs
100%
Help pages citing references
43%

Downloads

130
CRAN downloads in the past year
Rank #25,520 · ~0/day · ~11/mo
specProc
Daily download trend is not available in this view yet.
13030 days
13090 days
1301 year
Compare downloads with other packages →

Repository

5Stars
1Forks
0Open issues
0Open PRs
2Releases
594Commits
1Commit identities
chemometricscalibration-curvelaser-induced-breakdown-spectroscopyspectroscopy-preprocessingpeak-fittingplasma-diagnosticsmultivariate-filteringrobust-estimation
594 commits · Last activity 2026-10-20 · Default branch at 0.8.3.9000, ahead of CRAN 0.8.3 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
0

Releases over time

2026-10-16 · 12026-10-19 · 2
PracticesBeta

11 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/christiangoueguel/specproc on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-05 · The repository has a site deploy workflow

pkgdown site last built 2026-10-05, before release 0.8.3 (2026-10-15)

Coverage (1)
Coverage reporting
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 2 practices
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
45 external dependencies (excludes base and recommended)

Installing specProc adds 36 packages (19 with compiled code, 38 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, pls 4.2 MB.

Depends (1)
R >= 4.1.0
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 0.8.3 (2026)
Releases (1)
  • 0.8.3Latest
    2026-10-15 · current release ·
    12 days in CRAN's queue
    Listed in CRAN's incoming queue from 2026-10-03 21:57 to 2026-10-15 12:21 UTC, in 52 readings.
  • R
    R 4.6.0 released · 2026-04-24
Across CRAN, the median accepted release of the past year spent 23 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2026-10-15
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Bundled data
3.2 MB / 1 file
Download size
4.7 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("specProc")
Goueguel, C. L. (2026). specProc: Preprocessing Tools for Laser-Induced Breakdown Spectroscopy (Version 0.8.3) [Computer software]. https://doi.org/10.32614/CRAN.package.specProc

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for specProc version 0.8.3 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy