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<U+2011>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<U+2011>Triples created by n_triple() or n_triples() to append to existing provenance.

Details

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

Value

  • provenance(x) returns the contents of the "prov" attribute (character vector of N<U+2011>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 June 3, 2026, 5:07 p.m.