debug.lineage {provDebugR} | R Documentation |
The Lineage of a Variable/Data Node.
Description
For each data node queried, debug.lineage returns a data frame representing its forwards (how the data is used), or backwards (how the data was generated) lineage. Each data frame contains the following columns:
scriptNum: The script number the data node is associated with.
scriptName: The name of the script the data node is associated with.
startLine: The line number the data node is associated with.
code: The line of code which used/produced the data node.
Usage
debug.lineage(
...,
start.line = NA,
script.num = 1,
all = FALSE,
forward = FALSE
)
Arguments
... |
The names of data nodes to be queried. |
start.line |
The line number of the queried data nodes. Optional. |
script.num |
The script number of the queried data nodes. Defaults to script number 1 (main script). |
all |
If TRUE, this function returns the linages of all data node names. |
forward |
If TRUE, this function returns the forwards lineage (how the data is used) instead of the backwards lineage (how the data was generated). |
Details
debug.lineage belongs to provDebugR, a debugger which utilises provenance collected post-execution to facilitate understanding of the execution and aid in debugging.
This function may be used only after the debugger has been initialised using one its initialisation functions (listed below).
Value
A list of data frames showing the forwards or backwards lineage of all queried data nodes.
See Also
provDebugR Initialisation Functions:
Other provDebugR Functions (non-initialisation):
debug.error
: Returns the backwards lineage of the error, if any.
The error may be queried on StackOverflow.
debug.line
: Returns all immediate inputs and outputs
for the line(s) queried.
debug.state
: Returns the state at the line(s) queried,
after the line had been executed. The state is the list of all
variables and their values in the environment at the queried line.
debug.type.changes
: Returns a data frame for each variable in
the execution containing the instances where the data type changed.
debug.variable
: Returns a data frame showing all instances
of the variable(s) queried.
debug.view
: Opens and displays the contents of each file or variable
or variable queried.
debug.warning
: Returns the backwards lineage of the queried
warning(s), if any.
Examples
## Not run:
prov.debug.run("test.R")
debug.lineage(x)
debug.lineage("x", start.line = 5, script.num = 2)
debug.lineage("a", b, forward = TRUE)
debug.lineage(all = TRUE)
## End(Not run)