fc_stack {flowchart} | R Documentation |
fc_stack
Description
This function allows to combine vertically two different flowcharts.
Usage
fc_stack(fcs, unite = TRUE)
Arguments
fcs |
list with all the flowcharts that we want to merge |
unite |
logical value if the boxes have to be united or not |
Value
List containing a list with the datasets belonging to each flowchart and the flowchart parameters combining all the flowcharts.
Examples
#Create first flowchart for patients
fc1 <- clinic_patient |>
dplyr::filter(!is.na(group)) |>
as_fc(label = "Patients included") |>
fc_split(group)
#Create second flowchart for visits
fc2 <- clinic_visit |>
dplyr::filter(!is.na(group)) |>
as_fc(hide = TRUE) |>
fc_split(group, label = rep("Number visits", 2), text_pattern = "{label}\\n #' {n}")
list(fc1, fc2) |>
fc_stack() |>
fc_draw()
[Package flowchart version 0.3.0 Index]