updateProvenance: Add provenance information to an object

Description Usage Arguments Value Examples

Description

It's important to track data provenance, the steps taken to produce a particular dataset.

Usage

1
updateProvenance(x, message, caller = NULL, env = .GlobalEnv)

Arguments

x

An R object

message

A string (message to be added to the provenance)

caller

The calling function name (automatically filled in if NULL)

Value

The original object, with an updated provenance containing:

timestamp

Date and time entry was added

caller

The function that added this entry, including its parameter values

message

Description of action(s) taken

digest

Hash of the data when this entry was added; see digest

This function logs information from the caller to a 'provenance' data structure that is attached as an attribute of x.

Examples

1
2
3
d <- updateProvenance(cars, "first message")
d <- updateProvenance(d, "second message")
provenance(d)

bpbond/dataprov documentation built on May 13, 2019, 1:42 a.m.