p_flowchart {dtrackr} | R Documentation |
Flowchart output
Description
Generate a flowchart of the history of the dataframe(s), with all the tracked data pipeline as stages in the flowchart. Multiple dataframes can be plotted together in which case an attempt is made to determine which parts are common.
Usage
p_flowchart(
.data,
filename = NULL,
size = std_size$full,
maxWidth = size$width,
maxHeight = size$height,
formats = c("dot", "png", "pdf", "svg"),
defaultToHTML = TRUE,
landscape = size$rot != 0,
...
)
Arguments
.data |
the tracked dataframe(s) either as a single dataframe or as a list of dataframes. |
filename |
a file name which will be where the formatted flowcharts are
saved. If no extension is specified the output formats are determined by
the |
size |
a named list with 3 elements, length and width in inches and rotation. A predefined set of standard sizes are available in the std_size object. |
maxWidth |
a width (on the paper) in inches if |
maxHeight |
a height (on the paper) in inches if |
formats |
some of |
defaultToHTML |
if the correct output format is not easy to determine
from the context, default providing |
landscape |
rotate the output by 270 degrees into a landscape format.
|
... |
other parameters passed onto either |
Value
the nature of the flowchart output depends on the context in which
the function is called. It will be some form of browse-able html output if
called from an interactive session or a PNG
/PDF
link if in knitr
and
knitting latex or word type outputs, if file name is specified the output
will also be saved at the given location.
Examples
library(dplyr)
library(dtrackr)
tmp = iris %>% track() %>% comment(.tag = "step1") %>% filter(Species!="versicolor")
tmp %>% group_by(Species) %>% comment(.tag="step2") %>% flowchart()