Writes the provenance / audit trail of a PhysioExperiment (or a
provenance data.frame from provenance) to a
W3C PROV document. Three interchange syntaxes are supported: PROV-JSON
(default), PROV in JSON-LD, and PROV-N. The document round-trips exactly
through readProv.
Usage
writeProv(x, path, format = c("prov-json", "json-ld", "prov-n"))Examples
pe <- PhysioExperiment(
S4Vectors::SimpleList(raw = matrix(rnorm(20), 10, 2)), samplingRate = 100)
pe <- logStep(pe, "filterSignals", params = list(low = 1, high = 40))
tf <- tempfile(fileext = ".json")
writeProv(pe, tf)
readProv(tf)$activity
#> [1] "filterSignals"