prov.json: Provenance Access Functions

View source: R/API_rdt.R

prov.jsonR Documentation

Provenance Access Functions

Description

prov.json returns the current provenance graph as a prov-json string.

prov.dir returns the current provenance directory.

prov.visualize displays the current provenance as a graph.

prov.summarize outputs a text summary to the R console

Usage

prov.json()

prov.dir()

prov.visualize()

prov.summarize(save = FALSE, create.zip = FALSE)

Arguments

save

if true saves the summary to the file prov-summary.txt in the provenance directory

create.zip

if true all of the provenance data will be packaged up into a zip file stored in the current working directory.

Details

rdt collects provenance as a script executes. Once collected, prov.json can be called to access the provenance as a JSON string. This is useful for applications that operate on the provenance. The JSON is consistent with the PROV-JSON standard.

One such application is a graphic visualizer built into rdt. To view the provenance graphically, call prov.visualize. In the provenance graph, the nodes are data values and operations, with edges connecting them to show data and control flow dependencies. The visualizer also allows the user to view intermediate values of variables, and to graphically view the lineage of how a value was computed, or to look at how a value is used moving forward in the computation. The user can also search for specific data or operation nodes, files, or error messages in the provenance.

Creating a zip file depends on a zip executable being on the search path. By default, it looks for a program named zip. To use a program with a different name, set the value of the R_ZIPCMD environment variable. This code has been tested with Unix zip and with 7-zip on Windows.

Value

prov.json returns the current provenance graph as a prov-json string

prov.dir returns the current provenance directory.

prov.visualize loads and displays the current provenance graph in DDG Explorer. The prov.visualize function does not return a value.

References

PROV-JSON standard: https://www.w3.org/Submission/2013/SUBM-prov-json-20130424/

PROV-JSON output produced by rdt: https://github.com/End-to-end-provenance/ExtendedProvJson/blob/master/JSON-format.md

See Also

prov.init and prov.run for functions to collect provenance

Examples

prov.init()
a <- 1
b <- 2
ab <- a + b
prov.quit()
str <- prov.json()
pdir <- prov.dir()
## Not run: prov.visualize() 

End-to-end-provenance/rdt documentation built on Aug. 11, 2022, 12:55 p.m.