Learn R Programming

RCMIP5 (version 1.1)

addProvenance: Add provenance information to a cmip5data object

Description

It's important to track data provenance, the steps taken to produce a particular dataset. Each operation in the RCMIP5 package adds provenance information via this function.

Usage

addProvenance(x, msg, verbose = FALSE)

Arguments

x
A cmip5data object
msg
Either a string (message to be added to the provenance) or a cmip5data object, in which case the provenance of this latter object is appended to that of x (i.e., their histories are merged)
verbose
logical. Print info as we go?

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
dim
Data dimensions when this entry was added
digest
Hash of the data when this entry was added; see digest

Details

We want to track computational steps applied to a particular cmip5data object, for reproducibility and user debugging. This function logs information from the caller to a 'provenance' data structure.