Miscellaneous Functions for Processing and Sample Selection of Spectroscopic Data
Overview
Functions to preprocess spectroscopic data and conduct (representative) sample selection/calibration sampling.
Bug fixes
read_nircal(): fixed a failure when reading files whose sample IDs contain non-ASCII characters. NIRCal stores text in a Windows single-byte codepage (CP1252/latin1), but those bytes were passed toenc2utf8(), which honours the declared encoding of the input and therefore performs no conversion at all on strings read withreadBin(). In a UTF-8 locale the bytes were then left invalid andnchar()aborted withinvalid multibyte string. The record-number prefix is now stripped byte-wise and the text converted explicitly, so IDs such asAdubo Líquido_Tanque 05 - 18/02/2022are read correctly, including their internal slashes (#94).read_nircal(): fixed a failure when the names of the response variables contain regular expression metacharacters. The names are used to locate the sample blocks in the raw file and were interpolated into the search pattern unescaped, so names such asCa++orMg++aborted the read withinvalid use of repetition operators. Names containing(,)or+(for exampleP (Resina)orH+Al) were affected more quietly: the pattern remained valid but no longer matched the file, and the corresponding blocks were never found. Metacharacters are now escaped before the search (#94).
Show all changes in 0.2.11Hide the rest of the changes in 0.2.11
read_nircal(): fixed corruption of accented response variable names. These were converted withiconv(from = "ASCII", sub = "byte"), which replaces each non-ASCII byte with its hex escape as literal text, so a variable namedMatéria Orgânicawas returned asMat<e9>ria Org<e2>nica. Conversion now uses the encoding the files are actually written in (#94).read_nircal(): fixed the renaming of duplicated response variable names. The index was compared against the full vector of duplicated names rather than the one being processed, so files carrying two or more distinct duplicated names were labelled incorrectly (#94).
Internal
- Continuous integration moved to GitHub Actions (
R-CMD-check,pkgdown,rhuband test coverage workflows).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK2026-04-25
- NOTE12 OK, 2 NOTE2026-04-22
- ERROR10 OK, 2 NOTE, 2 ERROR2026-04-18
Show 1 earlier changeHide 1 earlier change
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 42 (17 internal)includes a package overview page
- Examples that run
- 65%13 run in a plain check · 7 never run
- Exported functions with examples
- 83%
- Documented parameters
- 100%
- Return-value docs
- 96%
- Help pages citing references
- 43%
Downloads
Repository
- PRs merged (all time)
- 96%
- Median days to close, 50 most recently updated closed issues
- 2
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
12 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/l-ramirez-lopez/prospectr on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-08-26 · The repository has a site deploy workflow
pkgdown site last built 2026-08-26
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2025-10-17Pull request: opened by its own accountCommits: 6 by its own account
- Claude Codefirst seen 2026-05-18Pull request it wrote: opened by a project memberCommits: at least 1 crediting it in the message
Dependencies
Installing prospectr adds 8 packages (4 with compiled code, 7.6 MB of source tarballs). Heaviest: mathjaxr 3.0 MB, Rcpp 1.8 MB, RcppArmadillo 1.0 MB.
Code & Tests
Datasets
People & History
Previously maintained by Antoine Stevens (0.1 to 0.1.3).
Pick two releases to compare their code metrics.
- 0.2.11Latest
- 0.2.102026-06-23 · diff ↗
- 0.2.92026-05-31 · diff ↗
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 0.2.82025-03-06 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 0.2.72024-02-16 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.2.62022-08-31 · diff ↗
- 0.2.52022-07-19 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.2.42022-04-03 · diff ↗
- 0.2.32022-02-18 · diff ↗
- 0.2.2
- RR 4.1.0 released · 2021-05-18
Show 15 earlier eventsHide 15 earlier events
- 0.2.1
- RR 4.0.0 released · 2020-04-24
- unarchivedReturned to CRAN2020-03-14
- 0.2.0
- archivedRemoved from CRAN2020-03-07check problems were not corrected despite reminders
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- RR 3.2.0 released · 2015-04-16
- RR 3.1.0 released · 2014-04-10
- 0.1.32014-02-14 · diff ↗
- 0.1.12013-12-09 · diff ↗
- 0.12013-08-14
- RR 3.0.0 released · 2013-04-03
Package metadata
- First published
- 2013-08-14
- Total releases
- 15 / 13 yrs
- License
- MIT + file LICENSE OSI · relicensed from GPL (>= 3) in 0.2.1
- Minimum R
- ≥ 3.5.0
- Bundled data
- 1.9 MB / 1 file
- Download size
- 6.2 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("prospectr")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
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.