Datamonger for R · r · 0.0.0.9000
Retrieve and verify data offline
Datamonger can retrieve and decode data without contacting a registry or an upstream provider. This example uses the five-row mixed CSV from the shared conformance corpus, which R, Python, and Julia use to check the same logical values and digest.
The package includes the corpus and its test registry. The setup copies their known bytes into a fresh temporary cache. Every retrieval below uses offline = TRUE, so a missing cache entry causes an error. In a research workflow, populate your cache with the selected registry and artifacts before disconnecting from the network.
Retrieve the verified artifact
fetch_artifact returns the cached CSV after checking its size and SHA-256 digest against the immutable registry record. The fully qualified reference fixes the dataset source, name, and version.
reference <- "conformance:mixed_csv@1"
artifact <-
artifact_sha256 <- digest::
artifact_sha256
#> [1] "8a46d390c070778b3617d11ba9a0ea0cb3516a2c54aeafdc53c9196367208c1e"
Decode the logical values
fetch_data also checks the registry's expected shape and canonical logical digest. The decoder follows the declared column types, quoting, missing values, and source row order rather than guessing them from the CSV.
result <-
data <- result$data
The decoded result has 5 rows and 4 columns. Missing values remain missing, and the quoted comma and double quotes remain part of their labels. The count column uses datamonger_int64, which stores exact decimal strings so that large integers do not lose precision.
display <- data
display$count <-
knitr::
measurement | count | label | enabled |
|---|---|---|---|
1.5 | 1 | alpha | TRUE |
0.0 | NA | quoted, value | FALSE |
NA | 3 | says "hello" | NA |
20.0 | 4 | NA | TRUE |
0.0 | 5 | omega | FALSE |
Retain verification metadata
The artifact digest identifies the original bytes. The canonical digest identifies their decoded logical values, including column types and missing values. Retain both with the registry selector when recording an analysis.
verification <-
knitr::
Field | Value |
|---|---|
Dataset | conformance:mixed_csv@1 |
Registry release | test-0002 |
Verification | decoded |
Canonical form | 1 |
Registry SHA-256 | f7a47e709a17eecf14ff3a7e8d76fa6b1cc4d7c1a9ba573c089de3c109da9033 |
Artifact SHA-256 | 8a46d390c070778b3617d11ba9a0ea0cb3516a2c54aeafdc53c9196367208c1e |
Canonical SHA-256 | e25d27e8b0008332d778cd48429a7c4f7af59411884092e52f120da63f26e726 |
Inspect the measurements
The third row has no measurement. Plotting the observed rows preserves their source positions and makes the larger value in the fourth row visible.

Four observed measurements; the third row is missing.
This small example verifies the complete path from cached artifact bytes to decoded values, reproducibility metadata, and a rendered figure. It uses a private temporary cache and removes that cache after execution.
