Datamonger for R · r · 0.0.0.9000
Datamonger for R
Reproducible Retrieval and Decoding of Public Research Data
This package implements Datamonger specification revision 1. It retrieves artifacts through strongly selected immutable registry indexes, verifies their bytes, decodes the revision 1 CSV, TSV, LIBSVM, and SVMLight representations, and verifies the canonical logical digest.
The package is pre-release software and is not yet on CRAN. Install it from the repository root:
Cache
Datamonger uses the platform cache returned by tools::R_user_dir() by default. Passing cache_dir uses that path for the call instead. For temporary caching, create a session directory and pass it consistently:
temporary_cache <-
iris <-
The package never writes persistent files at installation or startup. Cache growth is never automatic beyond explicitly requested registry and artifact retrievals, eviction is manual through cache_clean(), and cache_info() reports every content-addressed entry. Datamonger performs no telemetry.
Use
The bundled 1.1.0 index is the default trust root. Its dataset artifacts are retrieved on first use:
iris <-
heart <-
fetch_data(), data_info(), and fetch_artifact() also accept the dataset references used by the CLI:
iris <-
iris_v1 <-
iris_v1 <-
A bare name requires source. Omit source for qualified references, and omit version when the reference embeds it. Duplicate arguments raise an error even when the values agree. An omitted version selects the registry's declared default.
For reproducible analysis, select an explicit version and retain the returned metadata:
result <-
result$info$dataset_id
result$info$registry_release
result$info$registry_index_sha256
result$info$canonical_digest
Delimited data are returned as a data frame. Exact int64 columns use the datamonger_int64 vector class, backed by canonical decimal strings; this represents the full signed 64-bit range without conflating its minimum value with missing data. LIBSVM data return a datamonger_sparse_dataset containing a row-compressed Matrix feature matrix and an exact response vector. When a declared dimension exceeds the Matrix package's integer limit, the feature matrix is an exact datamonger_csr_matrix instead. Split representations keep train and test datasets separate.
data_info() and list_data() inspect provenance, license, distribution, and task metadata without retrieving artifacts. fetch_artifact() retrieves only verified artifact bytes. offline = TRUE forbids network access and requires the selected index and artifacts to be bundled or already cached.
The offline conformance example retrieves the shared mixed CSV fixture from a temporary cache, verifies its decoded digest, and renders its values and a plot. The package includes its inputs, so the example also runs after installation without a repository checkout.
Registry selection
An explicit strong selector fixes the release and exact index bytes:
selected <-
Selection precedence is a per-call registry argument, set_registry() for the session, the nearest .datamonger/selector.json, and the bundled selector. resolve_registry() discovers a selector by bare release through a mutable HTTPS catalog. That lookup is trusted only as strongly as the TLS session; it is not a cryptographic pin until its returned release and digest are recorded and reused.
The project code is MIT-licensed. Datasets retain their own licenses and terms; registry inclusion is not a license grant or a preservation guarantee.
