| Title: | Acquire Curated NIRS Reference Datasets ('nirs4all-datasets') |
|---|---|
| Description: | R binding over the 'nirs4all-datasets' C 'ABI' ('n4ds_*'): resolve a dataset id from the distributable catalog index into a version-pinned download contract, fetch the canonical 'Parquet' ('Dataverse' / 'Zenodo' / 'figshare') with SHA-256 verification into a local cache, and re-verify a cached directory offline. JSON crosses the stable C 'ABI'; analysis of the data is left to the host. |
| Authors: | Gregory Beurier [aut, cre] |
| Maintainer: | Gregory Beurier <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-06-12 17:41:43 UTC |
| Source: | https://github.com/GBeurier/nirs4all-datasets |
The C ABI version string.
n4ds_abi_version()n4ds_abi_version()
The C ABI version as a string.
Download + SHA-256-verify a resolved dataset into the cache (JSON status string).
n4ds_fetch(resolved_json, opts_json = "")n4ds_fetch(resolved_json, opts_json = "")
resolved_json |
A resolved contract (from |
opts_json |
Options as JSON: |
The fetch status as a JSON string
(dir, files:[{name, relpath, path, status}]).
Resolve a dataset id against an index JSON into its download contract (JSON string).
n4ds_resolve(index_json, dataset_id)n4ds_resolve(index_json, dataset_id)
index_json |
The distributable catalog index as a JSON string. |
dataset_id |
The dataset id to resolve. |
The resolved download contract as a JSON string
(id, tier, instance, doi, dataset_version, files, origins).
Re-verify a cached dataset directory against the contract's SHA-256s (JSON report).
n4ds_verify_cached(resolved_json, dir)n4ds_verify_cached(resolved_json, dir)
resolved_json |
A resolved contract as JSON. |
dir |
The cached dataset directory. |
The verification report as a JSON string
(dir, ok, files:[{name, relpath, status}]).