View source: R/get_attrition.R
| get_attrition | R Documentation | 
This is an experimental function that may be developed over time.
This function calculates the subjects counts excluded and included for each step of the cohort selection process.
get_attrition(data, criteria_descriptions, criteria_conditions,
subject_column_name)
data | 
 Dataframe. It is used as the input data to count the subjects that meets the criteria of interest  | 
criteria_descriptions | 
 
  | 
criteria_conditions | 
 
  | 
subject_column_name | 
 
  | 
criteria_descriptions and criteria_conditions need to be of same length
The counts and percentages of the remaining and excluded subjects for each step of the cohort selection in a table format.
visR::get_attrition(adtte,
  criteria_descriptions =
    c(
      "1. Placebo Group", "2. Be 75 years of age or older.",
      "3. White", "4. Site 709"
    ),
  criteria_conditions = c(
    "TRTP=='Placebo'", "AGE>=75",
    "RACE=='WHITE'", "SITEID==709"
  ),
  subject_column_name = "USUBJID"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.