addProvenance: Add provenance information to a cmip5data object

Description Usage Arguments Details Value Note

View source: R/addProvenance.R

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

1
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?

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.

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

Note

This is an internal RCMIP5 function and not exported.


RCMIP5 documentation built on May 1, 2019, 6:28 p.m.