Create a flowchart
flowchart.Rd
Flow
is an R6 class used for initializing, constructing and modifying the
information that goes into the flowchart. The plotting is then handled via the
plot()
function.
Usage
# S3 method for class 'Flow'
plot(x, xm = 0.1, ym = 0.1, hpad = 10, vpad = 10, ...)
Active bindings
n
Number of nodes
Parent
Vector of parent nodes
x
Vector of horizontal positions
Label
Vector of labels
Methods
Examples
fl <- Flow$new("All children\n(n=935)")
fl$add("Returned form\n(n=511)", parent=1)
fl$add("Baseline: 0\n(n=447)", parent=2, x=-1)
fl$add("Baseline: 1 or 2\n(n=14)", parent=2)
fl$add("Baseline: 3\n(n=50)", parent=2, x=1)
fl$add("Initiation\n(n=315)", parent=3, x=-1)
fl$add("Completion\n(n=276)", parent=6, x=-1)
fl$add("Completion\n(n=12)", parent=4)
fl
#> Label Parent x
#> 1 All children\n(n=935) 0 0
#> 2 Returned form\n(n=511) 1 0
#> 3 Baseline: 0\n(n=447) 2 -1
#> 4 Baseline: 1 or 2\n(n=14) 2 0
#> 5 Baseline: 3\n(n=50) 2 1
#> 6 Initiation\n(n=315) 3 -1
#> 7 Completion\n(n=276) 6 -1
#> 8 Completion\n(n=12) 4 0
#> Class: Flow
plot(fl)
plot(fl, hpad=20, vpad=20)
plot(fl, xm=0.25)