Package: specProc 0.8.3.9000

specProc: Preprocessing Tools for Laser-Induced Breakdown Spectroscopy

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>), wavelength selection (variable importance in projection, selectivity ratio, interval partial least squares), 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>), robust partial least squares regression (Hubert and Vanden Branden (2003) <doi:10.1002/cem.822>) and principal component regression (Hubert and Verboven (2003) <doi:10.1002/cem.783>) with their robust cross-validation (Engelen and Hubert (2005) <doi:10.1016/j.aca.2005.01.015>), robust classification by SIMCA (Vanden Branden and Hubert (2005) <doi:10.1016/j.chemolab.2005.03.002>) and discriminant analysis (Hubert and Van Driessen (2004) <doi:10.1016/S0167-9473(02)00299-2>), 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, and the robust models as 'parsnip' models and engines, for 'tidymodels' workflows. Computationally intensive steps are implemented in 'C++' via 'Rcpp' and 'RcppEigen'.

Authors:Christian L. Goueguel [aut, cre]

specProc_0.8.3.9000.tar.gz
specProc_0.8.3.9000.zip(r-4.7-x86_64)specProc_0.8.3.9000.zip(r-4.7-arm64)specProc_0.8.3.9000.zip(r-4.6-x86_64)specProc_0.8.3.9000.zip(r-4.6-arm64)specProc_0.8.3.9000.zip(r-4.5-x86_64)
specProc_0.8.3.9000.tgz(r-4.6-x86_64)specProc_0.8.3.9000.tgz(r-4.6-arm64)specProc_0.8.3.9000.tgz(r-4.5-x86_64)specProc_0.8.3.9000.tgz(r-4.5-arm64)
specProc_0.8.3.9000.tar.gz(r-4.7-arm64)specProc_0.8.3.9000.tar.gz(r-4.7-x86_64)specProc_0.8.3.9000.tar.gz(r-4.6-arm64)specProc_0.8.3.9000.tar.gz(r-4.6-x86_64)
specProc_0.8.3.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
specProc/json (API)

# Install 'specProc' in R:
install.packages('specProc', repos = c('https://christiangoueguel.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/christiangoueguel/specproc/issues

Pkgdown/docs site:https://christiangoueguel.com

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

boltzmann-plotcalibration-curvecalibration-free-libschemometricslaser-induced-breakdown-spectroscopymultivariate-filteringpeak-fittingplasma-diagnosticsrobust-estimationsaha-boltzmann-plotspectroscopy-preprocessingcpp

5.60 score 5 stars 6 scripts 92 downloads 169 exports 38 dependencies

Last updated from:b425f6e826. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK411
linux-devel-x86_64OK347
source / vignettesOK780
linux-release-arm64OK414
linux-release-x86_64OK505
macos-release-arm64OK437
macos-release-x86_64OK545
macos-oldrel-arm64OK262
macos-oldrel-x86_64OK923
windows-devel-arm64OK557
windows-devel-x86_64OK507
windows-release-arm64OK518
windows-release-x86_64OK473
windows-oldrel-x86_64OK435
wasm-releaseOK235

Exports:%>%adjusted_boxplotapply_calibrationaveragebaseline_alsbaseline_arplsbaseline_lambdabaseline_lspbin_spectrabiweight_locationbiweight_midcorrelationbiweight_midcovariancebiweight_midvariancebiweight_scaleboltzmannboltzmann_plotcalibration_curvecellpcacentercf_libscontributionscorrect_self_absorptioncorrelationdirect_orthogonaldirect_oscdirectional_outlyingnessdirectOutlyingnessdmodxelectron_densityemscepoflagged_regionsgap_derivativegaussian_profilegeneralized_boxplotglswglsw_alphahotelling_t2iqr_outliersiqrMethodlibs_linesline_finderline_intensitiesloading_peakslorentzianlorentzian_profilelts_fitmacropcamcwhirter_criterionmedcouple_weightminmaxmscmultipeak_fitmultipeakfitnasnist_ionization_energynist_levelsnist_linesnormalizenum_intervalso2plsoplsoscoutlierplotparetopareto_scalepartition_functionpdspeak_fitpeakfitplot_boltzmannplot_calibrationplot_cell_mapplot_contributionsplot_coomansplot_embeddingplot_fitplot_influenceplot_linesplot_loadingsplot_outlier_mapplot_outliersplot_shotsplot_somplot_spectraplot_wavelength_calibrationplot_wavelength_selectionplotfitplotSpecpoisson_scaleprojected_oscpseudo_voigtpseudo_voigt_profileq_residualsquantile_weightread_starkbreject_shotsrobpcarobust_bcyjrobust_darobust_rmsecvrobustBCYJrospcarousseeuw_crouxrousseeuwCrouxrpcrrsimcarsimplssaha_boltzmannsaha_boltzmann_plotsaturation_summarysavgol_derivativesavitzky_golayselect_wavelengthsself_absorptionsimcasimca_gammasimca_squaredsnvsomsom_stabilityspectral_norm_methodstark_tablestark_widthstarkb_linesstep_baselinestep_bin_spectrastep_cellpcastep_direct_orthogonalstep_direct_oscstep_emscstep_epostep_gap_derivativestep_glswstep_line_intensitiesstep_line_ratiostep_macropcastep_mscstep_o2plsstep_oplsstep_oscstep_pareto_scalestep_poisson_scalestep_projected_oscstep_reject_shotsstep_robpcastep_robust_bcyjstep_rospcastep_rsimplsstep_savgolstep_select_wavelengthsstep_snvstep_spectral_normstep_waveletstep_y_gradient_glswsummary_statssummaryStatstukey_ghtukeyGHumadvoigt_fwhmvoigt_profilewavelength_calibrationwavelet_featureswavelet_levelwhittakery_gradient_glswyGradientglswzscore

Dependencies:clicpp11DEoptimRdplyrfarvergenericsggplot2ggrepelgluegtableisobandlabelinglifecyclemagrittrMASSminpack.lmmomentspillarpkgconfigplspurrrR6RColorBrewerRcppRcppEigenrlangrobustbaseS7scalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

Preprocessing with recipe steps
Baseline correction | Normalization | Other steps | A model for potassium

Last update: 2026-10-05
Started: 2026-09-25

Plasma diagnostics
Detector saturation | Electron density | Temperature | Atomic data | Line intensities | Boltzmann and Saha-Boltzmann plots | Is the plasma in LTE? | Self-absorption | Calibration-free composition | Summary | References

Last update: 2026-10-01
Started: 2026-09-28

Fitting emission lines
Identifying the lines | Correcting the wavelength axis | Line profiles | Fitting a single line | Overlapping lines | Fitting every spectrum | Integrating instead of fitting | Summary

Last update: 2026-10-01
Started: 2026-10-01

Calibration curves and figures of merit
Line intensities | A calibration curve for potassium | Trace elements: weights and limits of detection | A multivariate model and its figures of merit | Summary

Last update: 2026-10-01
Started: 2026-09-25

Readme and manuals

Help Manual

Help pageTopics
Adjusted Boxplotadjusted_boxplot
Apply a Wavelength Calibrationapply_calibration
Fast Average for Large Spectral Datasetaverage
Asymmetric Least Squaresbaseline_als
Asymmetrically Reweighted Penalized Least Squaresbaseline_arpls
Baseline Smoothness Parameterbaseline_lambda
Least-Squares Polynomialbaseline_lsp
Binning of Adjacent Channelsbin_spectra
Biweight Locationbiweight_location
Biweight Midcorrelationbiweight_midcorrelation
Biweight Midcovariancebiweight_midcovariance
Biweight Midvariancebiweight_midvariance
Biweight Scalebiweight_scale
Plasma Temperature from a Boltzmann Plotboltzmann
Univariate Calibration Curvecalibration_curve
Robust PCA by Casewise and Cellwise Weighting (cellPCA)cellpca
Data Centeringcenter
Calibration-Free LIBS Quantificationcf_libs
Q and T-squared Contributions of a PCA Modelcontributions
Self-Absorption Correction with an Internal Reference Linecorrect_self_absorption
Correlation Coefficients: Pearson, Spearman, Kendall, Chatterjee, and Biweight Midcorrelationcorrelation
Direct Orthogonalizationdirect_orthogonal
Direct Orthogonal Signal Correctiondirect_osc
Directional Outlyingness for Skewed Distributiondirectional_outlyingness
Distance to the Model (DModX) of a PCA Modeldmodx
Electron Density from Stark Broadeningelectron_density
Extended Multiplicative Signal Correctionemsc
External Parameter Orthogonalizationepo
Flagged Regions of a MacroPCA or cellPCA Fitflagged_regions
LIBS Spectra of Forage SamplesforageLIBS
LIBS Laser Shots of Forage SamplesforageShots
Gap-Segment Derivativesgap_derivative
Gaussian Functiongaussian_profile
Generalized Boxplotgeneralized_boxplot
Generalized Least Squares Weightingglsw
Relative GLSW Weighting Parameterglsw_alpha
Hotelling's T-squared Statistic of Samples in an Embeddinghotelling_t2
Interquartile Range Methodiqr_outliers
Candidate Emission Lines for LIBS Spectralibs_lines
Interactive Identification of Emission Linesline_finder
Intensities of Emission Linesline_intensities
Robust Linear Regression in tidymodels (LTS parsnip Engine)linear_reg_lts lts_fit
Peaks of the Loadings of a PCAloading_peaks
Lorentzian Functionlorentzian_profile
Robust PCA for Cellwise and Casewise Outliers (MacroPCA)macropca
McWhirter Criterion for Local Thermodynamic Equilibriummcwhirter_criterion
Medcouple Tail Weight Measuremedcouple_weight
Min-Max Normalizationminmax
Multiplicative Signal Correctionmsc
Multiple Peaks Fittingmultipeak_fit
Net Analyte Signal and Figures of Meritnas
Ionization Energies from the NIST Atomic Spectra Databasenist_ionization_energy
Energy Levels and Partition Functions from the NIST Atomic Spectra Databasenist_levels partition_function
Atomic Line Data from the NIST Atomic Spectra Databasenist_lines
Spectra Normalizationnormalize
Number of Intervalsnum_intervals
Modified Orthogonal Projections to Latent Structureso2pls
Orthogonal Projections to Latent Structuresopls
Orthogonal Signal Correctionosc
Pareto Scalingpareto_scale
Piecewise Direct Standardizationpds
Peak Fittingpeak_fit
Draw a Boltzmann or Saha-Boltzmann Plotplot_boltzmann
Plot a Calibration Curveplot_calibration
Cell Map of a MacroPCA or cellPCA Fitplot_cell_map
Plot Q and T-squared Contributionsplot_contributions
Coomans Plot of a Robust SIMCA Modelplot_coomans
Plot a Two-Dimensional Embeddingplot_embedding
Plotting of Fitted Spectral Lineplot_fit
Influence Plot of a PCA Modelplot_influence
Overlay Emission Lines on a Spectrumplot_lines
Loadings of a PCA as Spectraplot_loadings
Outlier Map of a Robust PCA or Robust PLS Modelplot_outlier_map
Univariate Representation of Multivariate Outliersplot_outliers
Plots of the Laser Shots and of their Rejectionplot_shots
Plot a Self-Organizing Mapplot_som
Plotting of Spectraplot_spectra
Plot a Wavelength Calibrationplot_wavelength_calibration
Plot of a Wavelength Selectionplot_wavelength_selection
Robust PLS Regression in tidymodels (parsnip Engine)pls_rsimpls
Poisson Scalingpoisson_scale
Predict from a Calibration Curvepredict.specproc_calibration
Apply EMSC to New Spectrapredict.specproc_emsc
Apply an Orthogonalization Filter to New Spectrapredict.o2pls predict.specproc_direct_orthogonal predict.specproc_direct_osc predict.specproc_epo predict.specproc_filter predict.specproc_osc predict.specproc_projected_osc
Scores and Distances of New Observationspredict.specproc_cellpca predict.specproc_macropca predict.specproc_robpca
Net Analyte Signal of New Samplespredict.specproc_nas
Predict with an OPLS Modelpredict.specproc_opls
Predictions of a Robust Discriminant Analysispredict.specproc_robust_da
Predictions of a Robust PCR Modelpredict.specproc_rpcr
Predictions of a Robust SIMCA Modelpredict.specproc_rsimca
Predictions of a Robust PLS Modelpredict.specproc_rsimpls
Map New Spectra onto a Self-Organizing Mappredict.specproc_som
Correct Wavelengths with a Wavelength Calibrationpredict.specproc_wavelength_calibration
Projected Orthogonal Signal Correctionprojected_osc
Pseudo-Voigt Functionpseudo_voigt_profile
Hotelling's T-squared and Q Residuals of a PCA Modelq_residuals
Quantile Tail Weight Measurequantile_weight
Read Saved STARK-B Dataread_starkb
Rejection of Outlying Laser Shotsreject_shots
Robust Principal Component Analysis (ROBPCA)robpca
Robust Box-Cox and Yeo-Johnson Transformationrobust_bcyj
Robust Linear and Quadratic Discriminant Analysisrobust_da
Robust Cross-Validation of a Robust Calibration Modelrobust_rmsecv
Robust Sparse Principal Component Analysis (ROSPCA)rospca
Rousseeuw-Croux Scale Estimatorsrousseeuw_croux
Robust Principal Component Regression (RPCR)rpcr
Robust SIMCA Classification (RSIMCA)rsimca
Robust Partial Least Squares Regression (RSIMPLS)rsimpls
Plasma Temperature from a Saha-Boltzmann Plotsaha_boltzmann
Detect Saturated Channels in Spectrasaturation_summary
Derivative Order of a Savitzky-Golay Filtersavgol_derivative
Savitzky-Golay Smoothing and Derivativessavitzky_golay
Wavelength Selection for PLS Regressionselect_wavelengths
Self-Absorption Coefficient from Line Widthsself_absorption
SIMCA Classification Model (parsnip)simca update.simca
Tuning Parameters of the SIMCA Modelsimca_gamma simca_squared
Standard Normal Variatesnv
Self-Organizing Map of Spectrasom
Stability of a Self-Organizing Mapsom_stability
Norm of a Spectral Normalizationspectral_norm_method
Build a Table of Stark Broadening Parametersstark_table
Stark Width of a Line at Given Plasma Conditionsstark_width
Stark Broadening Parameters from the STARK-B Databasestarkb_lines
Baseline Correction Recipe Stepstep_baseline
Binning Recipe Stepstep_bin_spectra
cellPCA Recipe Stepstep_cellpca
Direct Orthogonalization Recipe Stepstep_direct_orthogonal
Direct Orthogonal Signal Correction Recipe Stepstep_direct_osc
Extended Multiplicative Signal Correction Recipe Stepstep_emsc
External Parameter Orthogonalization Recipe Stepstep_epo
Gap-Segment Derivative Recipe Stepstep_gap_derivative
Generalized Least Squares Weighting Recipe Stepstep_glsw
Emission Line Intensities Recipe Stepstep_line_intensities
Internal Standard Normalization Recipe Stepstep_line_ratio
MacroPCA Recipe Stepstep_macropca
Multiplicative Scatter Correction Recipe Stepstep_msc
O2PLS Filter Recipe Step for One or Several Outcomesstep_o2pls
Orthogonal Projections to Latent Structures (OPLS) Recipe Stepstep_opls
Orthogonal Signal Correction Recipe Stepstep_osc
Pareto Scaling Recipe Stepstep_pareto_scale
Poisson Scaling Recipe Stepstep_poisson_scale
Projected Orthogonal Signal Correction (OPLS Filter) Recipe Stepstep_projected_osc
Shot Rejection Recipe Stepstep_reject_shots
Robust PCA (ROBPCA) Recipe Stepstep_robpca
Robust Box-Cox and Yeo-Johnson Transformation Recipe Stepstep_robust_bcyj
Robust Sparse PCA (ROSPCA) Recipe Stepstep_rospca
Robust PLS (RSIMPLS) Recipe Stepstep_rsimpls
Savitzky-Golay Recipe Stepstep_savgol
Wavelength Selection Recipe Stepstep_select_wavelengths
Standard Normal Variate Recipe Stepstep_snv
Spectral Normalization Recipe Stepstep_spectral_norm
Wavelet Features Recipe Stepstep_wavelet
y-Gradient Generalized Least Squares Weighting Recipe Stepstep_y_gradient_glsw
Classical or Robust Descriptive Statisticssummary_stats
Tukey g-and-h Parametric Distributiontukey_gh
Unbiased Median Absolute Deviationumad
Full Width at Half Maximum of a Voigt Profilevoigt_fwhm
Voigt Functionvoigt_profile
Wavelength Calibration from Reference Lineswavelength_calibration
Wavelet Coefficients of Spectrawavelet_features
Number of Levels of a Wavelet Decompositionwavelet_level
y-Gradient Generalized Least Squares Weightingy_gradient_glsw
Classical or Robust Z-Scorezscore