
Creating consort flow diagram with visR
Source:vignettes/Consort_flow_diagram.Rmd
      Consort_flow_diagram.RmdAttrition example
Data preparation
Prepare the data using the attrition function.
attrition <- visR::get_attrition(adtte,
   criteria_descriptions = c("1. Not in Placebo Group",
                             "2. Be 75 years of age or older.",
                             "3. White",
                             "4. Female"),
   criteria_conditions   = c("TRTP != 'Placebo'",
                             "AGE >= 75",
                             "RACE=='WHITE'",
                             "SEX=='F'"),
   subject_column_name   = "USUBJID")Adding more detail
Adding more detailed complement descriptions to the “exclusion” part of the CONSORT diagram
Add the control group
Step 1. Add new column to attrition dataframe
attrition$Complement <- c("NA", "Placebo Group", "Younger than 75 years", "Non-White", "Male")


