Package: proximetricsR 0.6.4

Leonardo Ramirez-Lopez

proximetricsR: Spectral Preprocessing and Chemometric Calibration of NIR Sensors

Provides tools to build quantitative chemometric models and applications for near-infrared (NIR) sensors. Chemometric regression models are based on partial least squares regression as described by Wold (1975) <doi:10.1016/B978-0-12-103950-9.50017-4> and modified partial least squares regression as described by Shenk and Westerhaus (1991) <doi:10.2135/cropsci1991.0011183X003100020049x>, with further discussion by Westerhaus (2014) <doi:10.1255/nirn.1492>.

Authors:Leonardo Ramirez-Lopez [aut, cre], Claudio Orellano [aut], Nicolae Cudlenco [aut], Mai Said [aut], Mohamed Abushosha [aut], Marcal Plans [aut]

proximetricsR_0.6.4.tar.gz
proximetricsR_0.6.4.zip(r-4.7)proximetricsR_0.6.4.zip(r-4.6)proximetricsR_0.6.4.zip(r-4.5)
proximetricsR_0.6.4.tgz(r-4.6-x86_64)proximetricsR_0.6.4.tgz(r-4.6-arm64)proximetricsR_0.6.4.tgz(r-4.5-x86_64)proximetricsR_0.6.4.tgz(r-4.5-arm64)
proximetricsR_0.6.4.tar.gz(r-4.7-arm64)proximetricsR_0.6.4.tar.gz(r-4.7-x86_64)proximetricsR_0.6.4.tar.gz(r-4.6-arm64)proximetricsR_0.6.4.tar.gz(r-4.6-x86_64)
proximetricsR_0.6.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
proximetricsR/json (API)

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

Bug tracker:https://github.com/l-ramirez-lopez/proximetricsr/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

On CRAN:

Conda:

quartoopenblascppopenmp

5.51 score 1 stars 5 scripts 34 exports 84 dependencies

Last updated from:6114406a05. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK198
linux-devel-x86_64OK209
source / vignettesOK293
linux-release-arm64OK199
linux-release-x86_64OK215
macos-release-arm64OK148
macos-release-x86_64OK344
macos-oldrel-arm64OK171
macos-oldrel-x86_64OK383
windows-develOK223
windows-releaseOK193
windows-oldrelOK229
wasm-releaseOK169

Exports:add_application_metadataadd_model_metadatacalibratecalibrate_modelscalibration_controlextract_property_namesfit_plsrfit_xlsrget_proxiscout_wavenumbersprep_derivativeprep_detrendprep_resampleprep_smoothprep_snvprep_transformprep_wav_trimpreprocess_recipeprocessproximate_add2naxproximate_dataproximate_mergeproximate_read_calproximate_read_dataproximate_read_naxproximate_recalibrate_naxproximate_write_dataproximate_write_modelproximate_write_naxproxiscout_read_dataproxiscout_repetition_patternproxiscout_write_dataproxiscout_write_modelread_spcvalidate_prediction

Dependencies:askpassbase64encbslibcachemcallrcellrangerclicodetoolscpp11crayoncrosstalkcurldata.tabledigestdplyrevaluatefarverfastmapfontawesomeforeachfsgenericsggplot2gluegtablehighrhmshtmltoolshtmlwidgetshttrisobanditeratorsjquerylibjsonliteknitrlabelinglaterlazyevallifecyclemagrittrmathjaxrmemoisemimeopensslotelpillarpkgconfigplotlyprettyunitsprocessxprogresspromisesprospectrpspurrrquartoR6rappdirsRColorBrewerRcppRcppArmadilloreadxlrematchrlangrmarkdownrstudioapiS7sassscalesstringistringrsystibbletidyrtidyselecttinytexutf8uuidvctrsviridisLitewithrxfunyamlzip

ProxiScout: Building applications
Introduction | Setup | Workflow overview | Prepare spectral data | Define preprocessing recipe | Build calibration model | Example 1: Build a single model | Serialize the model for deployment | Example 2: Build multiple models at once testing different pre-processings | Serialize the multiple models for deployment | Export for ProxiScout | Device-specific considerations | References

Last update: 2026-06-22
Started: 2026-06-18

ProxiMate: Building applications
Introduction | Build an application | Read the calibration data and prepare it | Merge multiple datasets | Resample to constant resolution | Activate/deactivate rows for modeling | Get the names of the response variables | Calibrating models using calibrate_models() | formulas: defining what is to be modeled | metadata_list: specify the property metadata | preprocess_recipes: create pre-processing recipes | method: how to fit the spectral models | control: Setting up the calibration parameters | Calibrate the spectral models | Overview of the best models found | Checking all the models tested | Predicting the properties in unseen samples | Writting down an application file | Other functionality | Calibrate single models with calibrate | Write model-related files (tsv, cal, prj and rtf)

Last update: 2026-06-22
Started: 2026-06-18

ProxiScout: Structure of the applications
Introduction | ProxiScout predictive application package | Overview | Deployment workflow | operations.json | Purpose | File structure | Operation Object | Example | Execution model | proximetricsR function reference | Spectra scale (ID: 37) | Get absorbance (ID: 29) | Average readings (ID: 7) | SNV (ID: 2) | Detrending (ID: 3) | Savitzky-Golay smoothing and differentiation (ID: 83) | Variable selection (ID: 17) | model_info.json | Contents

Last update: 2026-06-21
Started: 2026-06-18

An introduction to the proximetricsR package
Overview | Background: NIR spectroscopy and applications | Application workflows for ProxiMate and ProxiScout | Scope of proximetricsR

Last update: 2026-06-19
Started: 2026-06-18

Read and recalibrate application
Summary | Calibrate an application and write a nax | Read ProxiMate application files (.nax) | Recalibrate application | Just re-fit the models | Recalibrate based on new data

Last update: 2026-06-19
Started: 2026-06-18

Spectral pre-processing recipes
Overview | Key concepts | Setup | Preprocessing constructors | Resampling: prep_resample() | Smoothing: prep_smooth() | Standard Normal Variate: prep_snv() | Derivatives: prep_derivative() | Detrending: prep_detrend() | Reflectance/Absorbance conversion: prep_transform() | Wavelength trimming: prep_wav_trim() | Building preprocessing recipes | Device compatibility | Building recipes | Applying recipes with process() | Practical examples | Example 1: ProxiMate workflow | Example 2: ProxiScout workflow with detrending | Example 3: Minimal preprocessing | Example 4: Wavelength band selection | Best practices | Order matters | Device-aware development | Reproducibility | Parameter tuning | Summary

Last update: 2026-06-19
Started: 2026-06-18

Mathematical overview of regression algorithms
Introduction | Correlation vs. covariance | Partial Least Squares Regression algorithms | Standard PLSR algorithm | Modified PLSR algorithm | NIRWise PLUS-compatible PLSR implementation | Derived matrices and diagnostics | PLS predictions | Predictions using scores | Predictions using regression coefficients | Extended PLSR: the XLS algorithm | References

Last update: 2026-06-18
Started: 2026-06-18

ProxiMate: Structure of the applications
Introduction | Structure of the ProxiMate predictive applications | Calibration data file (.tsv) | Local data file (.tsv) | Calibration model files (.cal) | Project files (.prj) | Report files (.rtf) | Application metadata file (.nad) | Application file (.nax) | References

Last update: 2026-06-18
Started: 2026-06-18

Readme and manuals

Help Manual

Help pageTopics
Overview of the proximetricsR packageproximetricsR-package proximetricsR
A function for adding application metadata to a list of 'spectral_model' objectsadd_application_metadata
A function for adding model metadata to a 'spectral_model' objectadd_model_metadata
Calibrate a spectral modelcalibrate calibrate.default calibrate.formula predict.spectral_model
Calibrate models for multiple response variablescalibrate_models predict.spectral_multimodel
A function that controls the calibration of modelscalibration_control
Extract the property names from a given 'data.frame'extract_property_names
Fitting method constructorsfit_constructors fit_plsr fit_xlsr
ProxiScout standard wavenumbersget_proxiscout_wavenumbers
NIRcannabisNIRcannabis
Plot results of a given modelplot.spectral_model
Derivative constructor for spectral preprocessingprep_derivative
Detrending constructor for spectral preprocessingprep_detrend
Resampling constructor for spectral preprocessingprep_resample
Smoothing constructor for spectral preprocessingprep_smooth
Standard Normal Variate constructor for spectral preprocessingprep_snv
Reflectance/absorbance conversion constructor for spectral preprocessingprep_transform
Wavelength trimming constructor for spectral preprocessingprep_wav_trim
Build and execute spectral preprocessing recipespreprocess_recipe process
Prepare data for augmenting a nax applicationproximate_add2nax
Create a data frame for NIRWise PLUS applicationsproximate_data
Merge datasets of class 'proximate_data'proximate_merge
Read model parameters from ProxiMate .cal filespredict.read_cal proximate_read_cal
Read ProxiMate (.tsv) filesproximate_read_data
Reads and summarizes ProxiMate spectroscopic applications (nax files)proximate_read_nax
Recalibrate a nax fileproximate_recalibrate_nax
Write NIRWise PLUS readable tab-separated filesproximate_write_data
Write calibration (.cal), project (.prj) and report (.rtf) files to a specified directoryproximate_write_model
Create an application file for the given list of modelsproximate_write_nax
Read and parse ProxiScout data from CSV or XLSX filesproxiscout_read_data
ProxiScout repetition patternproxiscout_repetition_pattern
Write data files for ProxiScout devicesproxiscout_write_data
Write a calibration model to ProxiScout JSON formatproxiscout_write_model
Read and format spectral data from a fileread_spc
The spectral_fit classspectral_fit
Validate predictions of class ''spectral_prediction''validate validate_prediction