Description Usage Arguments Details Examples
Functions to create a valid ProvStore object from raw data about evaluation history (including hashes of input and output variable values).
1 2 3 4 5 6 7 8 9 10 | makeProvStore(invarhashes = NULL, outvarhashes = NULL, code = NULL,
codehash = fastdigest(code), invars = names(invarhashes),
outvars = names(outvarhashes), invarclasses = character(),
outvarclasses = character(), agent = getUser(), hashprefix = "SpookyV2")
ProvStoreDF(outvars = character(), outvarhashes = character(),
outvarclasses = character(), invars = character(),
invarhashes = character(), invarclasses = character(),
agent = character(), code = character(), codehash = vapply(code,
fastdigest, character(1)), hashprefix = "SpookyV2", df = NULL)
|
invarhashes |
character. Hashes of values for input variables (or NULL). |
outvarhashes |
character. Hashes of values for output variables (or NULL). |
code |
character. The code associated with the input and output variables in question. |
codehash |
character. The hash of the (parsed and deparsed) code. |
invars |
character. The set of input variables (symbols) to
|
outvars |
character. The output variable(s) (symbols) to
|
invarclasses |
character. The (top level) classes of the input variable values. |
outvarclasses |
character. The (top level) classes of the output variable values. |
agent |
character. a string identifying the user. Defaults to
the output of a |
hashprefix |
character. A prefix to append to the hashes if not present already to make them more self-describing. |
df |
data.frame. Optional. An already constructed data.frame
do use as the provdata of the constructed |
makeProvStore expects information about a single code unit. i.e., all input values will be counted as inputs for all outputs. For makeProvStore the number of inputs and outputs need not match, and the appropriate replication on inputs will happen automatically.
ProvStoreDF is a direct constructor and thus expects the replciation of inputs for multiple outputs to have already occurred.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## spoof the information needed to create a provstore
library(fastdigest)
code = c("x = 5", "y = x + 1")
outvars = c("x", "y")
outvarhashes = c(fastdigest(5), fastdigest(6))
outvarclasses = rep("numeric", 2)
invars = c("", "x")
invarhashes = c("", fastdigest(5))
invarclasses = c("", "numeric")
ps = ProvStoreDF(outvars = outvars,
outvarhashes = outvarhashes,
outvarclasses = outvarclasses,
invars = invars,
invarhashes = invarhashes,
invarclasses = invarclasses,
code = code,
agent = "coolguyorgirl")
df = data.frame(outputvar = outvars,
outputvarhash = outvarhashes,
outputvarclass = outvarclasses,
inputvar= invars,
inputvarhash = invarhashes,
inputvarclass = invarclasses,
agent = "coolgirloruy",
code = code,
codehash = sapply(code, fastdigest),
stringsAsFactors = FALSE)
ps2 = ProvStoreDF(df = df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.