provenance: Get or update provenance information

View source: R/provenance.R

provenanceR Documentation

Get or update provenance information

Description

Retrieve or append provenance statements (in N‑Triples form) stored on a dataset_df() object.

Usage

provenance(x)

provenance(x) <- value

Arguments

x

A dataset created with dataset_df().

value

Character vector of N‑Triples created by n_triple() or n_triples() to append to existing provenance.

Details

Provenance is stored in the "prov" attribute as N‑Triples text. Use n_triple() or n_triples() to construct valid statements that follow PROV‑O (e.g., prov:wasGeneratedBy, prov:wasInformedBy).

Value

  • provenance(x) returns the contents of the "prov" attribute (character vector of N‑Triples), or NULL if none is set.

  • provenance(x) <- value appends value to the "prov" attribute and returns the modified dataset invisibly.

Examples

provenance(orange_df)

# Add a provenance statement:
provenance(orange_df) <- n_triple(
  "https://doi.org/10.5281/zenodo.10396807",
  "http://www.w3.org/ns/prov#wasInformedBy",
  "http://example.com/source#1"
)


dataset documentation built on Nov. 16, 2025, 5:06 p.m.