Learn R Programming

provDebugR (version 1.0.1)

debug.type.changes: Tracking Type Changes

Description

Returns a data frame for each variable in the execution containing the instances where the data type changed. Each data frame contains the following columns:

  • value: The value of the variable.

  • container: The type of the container of the variable.

  • dimension: The size of the container.

  • type: The data type(s) contained within the container.

  • code: The line of code associated with the variable.

  • scriptNum: The script number associated with the variable.

  • scriptName: The name of the script associated with the variable.

  • startLine: The line number associated with the variable.

Usage

debug.type.changes(...)

Arguments

...

Optional. Variable name(s) to be queried. If variables are given (not NULL), the results will be filtered to show only those with the given variable name.

Value

A list of data frames for each variable with at least 1 data type change.

Details

debug.type.changes 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).

See Also

provDebugR Initialisation Functions:

prov.debug

prov.debug.file

prov.debug.run

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.lineage: Returns the forwards or backwards lineage of the data object(s) queried. The forwards lineage shows how the data object was used, and the backwards lineage shows how it was produced.

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.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

Run this code
# NOT RUN {
prov.debug.run("test.R")
debug.type.changes()
debug.type.changes(x)
debug.type.changes("a", "b")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab