Learn R Programming

flowchart (version 0.3.0)

fc_merge: fc_merge

Description

This function allows to combine horizontally two different flowcharts.

Usage

fc_merge(fcs)

Value

List containing a list with the datasets belonging to each flowchart and another list with each of the flowcharts parameters to merge.

Arguments

fcs

list with all the flowcharts that we want to merge

Examples

Run this code
#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(label = "Number of visits") |>
  fc_split(group)

list(fc1, fc2) |>
  fc_merge() |>
  fc_draw()

Run the code above in your browser using DataLab