Skip to content

proximetricsR

0.7.1Package record

Spectral Preprocessing and Chemometric Calibration of NIR Sensors

0packages depend
1.3Kdownloads / year
83.8%test coverage
13/13flavors OK

Overview

About

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.

Changes in 0.7.1
  • Feat: new dataset proxiscoutCannabis, containing absorbance spectra of 192 cannabis samples measured with three ProxiScout devices at the 257 standard ProxiScout wavenumbers, together with eleven cannabinoid reference variables (CBDA, CBG, CBD, CBN, THC, THCA, CBC, CBGA, CBD_total, THC_total and CBGt). The set includes one deliberate outlier and a deviceId column usable as validation_group.
  • Deprecated: the dataset NIRcannabis was renamed to proximateCannabis, for consistency with the new proxiscoutCannabis dataset. The old name still works but is deprecated and will be removed in a future release.
  • Breaking: the dataset NIRcannabis was renamed to proximateCannabis, for consistency with the new proxiscoutCannabis dataset. The old name is kept as a deprecated copy and will be removed in a future release.
  • Docs: proximateCannabis and proxiscoutCannabis cross-reference each other, noting that they share neither samples nor reference values.
  • Feat: validation results now include the Mahalanobis (GH) distance, computed from scaled PLS scores, and the spectral (X-space) residual for each sample. Both are returned by calibrate_models() and validate_prediction() and are available for downstream analysis.
  • Feat: plot.spectral_model() gained a validation_group argument to colour validation samples by group, for example by instrument.
  • Feat: new "Leverage vs. Spectral Residual" validation plot, showing each sample's leverage and spectral residual relative to their control limits (dashed line at 1), with grouped colouring.
  • Feat: predict.spectral_model() returns per-component control limits for the leverage (new-observation Mahalanobis limit) and spectral residual Q (calibration quantile), configurable via control_limit_conf (default 0.99) and carried through validate_prediction().
  • Misc: group argument checking for sample_group and validation_group refactored into a single internal helper.
  • Fix: predict.spectral_model() no longer misaligns newdata with prep_wav_trim(trim_constant_edges = TRUE); the trimmed band is resolved at calibration time and reapplied deterministically.
  • Fix: the nwp fit method left projection_m out of its slope correction, so scores of new samples (and therefore their leverage and spectral residual) were wrong; predictions were unaffected.
  • Feat: proxiscout_write_data() also writes a <prefix>_metadata.csv with the sample names and any leftover columns.
Show all changes in 0.7.1Hide the rest of the changes in 0.7.1
  • Fix: proxiscout_write_data() renames the correct SNR/SRN column to deviceId and honours integer spc.
  • Fix: proxiscout_write_data() now writes consistent sampleName/deviceId headers across all files (the spectra file previously used Sample Name/Device Id).
  • Tests: added unit tests for proxiscout_write_data().
  • Fix: proxiscout_read_data() now treats "", "-" and "NA" as missing values when reading CSV and XLSX files, so numeric columns using these placeholders are read as numeric.
  • Fix: extract_property_names() no longer returns the internal .repetition_group column as a property for proxiscout_data.
  • Tests: added unit tests for extract_property_names() and the missing-value handling in proxiscout_read_data().
  • Docs: documented the new arguments, validation statistics and plot, including in model_plot_template.qmd.

From NEWS in the release

Install

Health

CRAN checks
13OK
Slowest check: 7.0 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK6 OK2026-07-01
Advisories

none known

Documentation

In release 0.7.1
READMEYes · 789 wordsVignettesYes · 8 · dynamicNEWSYes · 33% structured · mentions 0.7.1Citation fileYes · computed when R runs itWebsiteYes · pkgdown
Help pages
75 (37 internal)includes a package overview page
Examples that run
56%14 run in a plain check · 10 only when donttest examples are enabled (R CMD check --as-cran) · 1 hold no code
Exported functions with examples
73%
Documented parameters
96%
Return-value docs
100%
Help pages citing references
4%

Downloads

1.3K
CRAN downloads in the past year
Rank #11,633 · ~4/day · ~108/mo
Daily download trend is not available in this view yet.
29130 days
93690 days
1.3K1 year
Compare downloads with other packages →
Also on79 r2u4 autocran

Repository

1Stars
2Forks
0Open issues
4Open PRs
2Releases
132Commits
2Commit identities
calbrationcheminformaticschemometricsnear-infrarednear-infrared-spectroscopypedometricsr-langr-language
132 commits · Last activity 2026-09-28 · 0% stars, 30d · Default branch at 0.7.2, ahead of CRAN 0.7.1 (checked 2026-10-21)
Responsiveness
How these are sampled
PRs merged (all time)
75%
Median days to close, 50 most recently updated closed issues
1
Median days to close, 50 most recently updated closed PRs
1

Stars over time

2026-08-05 · 02026-09-18 · 1
Earlier repositories
PracticesBeta

9 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/buchi-labortechnik-ag/proximetricsr on 2026-10-21.

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.qmdpkgdown

GitHub Pages site last deployed 2026-09-28 · The repository has a site deploy workflow

Coverage (1)
Coverage reporting
Research and citation (1)
CITATION.cff
Show all practicesHide 1 practice
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
21 external dependencies (excludes base and recommended)

Installing proximetricsR adds 83 packages (42 with compiled code, 77 MB of source tarballs). Heaviest: stringi 11 MB, prospectr 6.2 MB, ggplot2 6.0 MB.

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

Nothing depends on this yet.

Datasets

People & History

People (6)
Author, Maintainer since 0.6.4 (2026)
Author
Releases (4)

Pick two releases to compare their code metrics.

  • 0.7.1Latest
    record
    2026-09-04 · current release · diff ↗
  • 0.7.0
    record
    2026-08-04 · diff ↗ ·
    added 1 export
    proxiscout_write_model_info
  • 0.6.5
    record
    2026-07-17 · diff ↗
  • 0.6.4
    record
    2026-06-30
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-06-30
Total releases
4 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.2.0
Bundled data
607 KB / 3 files
Download size
3.8 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("proximetricsR")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

The repository also keeps a CITATION.cff.

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 proximetricsR version 0.7.1 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, 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