# Create first flowchart for ITT
fc1 <- safo |>
as_fc(label = "Patients assessed for eligibility") |>
fc_filter(itt == "Yes", label = "Intention to treat (ITT)")
# Create second flowchart for PP
fc2 <- safo |>
as_fc(label = "Patients assessed for eligibility") |>
fc_filter(pp == "Yes", label = "Per protocol (PP)")
list(fc1, fc2) |>
fc_merge() |>
fc_draw()
Run the code above in your browser using DataLab