Renders the lineage graph returned by lg_lineage() as an interactive
inline widget (using DiagrammeR if installed), or writes the DOT source
to a file for rendering with Graphviz externally.
Arguments
- lineage
An
lg_lineageobject fromlg_lineage().- output
Character or
NULL. File path for DOT output (e.g."pipeline.dot"). WhenNULL(default), renders inline usingDiagrammeR::grViz()if available, otherwise prints the DOT source to the console.
Examples
lg_start()
#> lineager: session started
pts <- lg_tag(
data.frame(
USUBJID = c("P01", "P02"),
eligible = c(TRUE, FALSE),
stringsAsFactors = FALSE
),
dataset_id = "PATIENTS"
)
#> lineager: tagged 'PATIENTS' — 2 rows, 2 cols
lg_filter(pts, eligible, reason = "Not eligible")
#> lineager: [PATIENTS] filter 'Not eligible' — 2 in, 1 out, 1 excluded
#> <lg_df> 'PATIENTS' [1 × 3]
#> USUBJID eligible
#> 1 P01 TRUE
lin <- lg_lineage()
lg_plot(lin)
lg_end()
#> lineager: session ended — 1 operation(s), 1 exclusion(s), 0 population(s), 0 var spec(s)
