Returns the provenance metadata recording the full data lineage: source file, step history with row counts, and environment info.
Usage
provenance(x, ...)
# S3 method for class 'Survey'
provenance(x, ...)
# S3 method for class 'data.table'
provenance(x, ...)
# Default S3 method
provenance(x, ...)Arguments
- x
A Survey object or a
data.tablefromworkflow().- ...
Additional arguments (unused).
Examples
svy <- Survey$new(
data = data.table::data.table(id = 1:10, age = 20:29, w = 1),
edition = "2023", type = "test", psu = NULL,
engine = "data.table", weight = add_weight(annual = "w")
)
provenance(svy)
#> ── Data Provenance ─────────────────────────────────────────────────────────────
#> Loaded: 2026-02-25T12:01:00
#> Initial rows: 10
#>
#> Environment:
#> metasurvey: 0.0.21
#> R: 4.5.2
#> survey: 4.5