Learn R Programming

PRISMAstatement (version 1.1.1)

flow_exclusions: Generic exclusions flow chart (beta)

Description

Generate the DOT description for a series of inclusions and exclusions

Usage

flow_exclusions(incl_counts, total_label = "Total",
  incl_labels = LETTERS[seq_len(length(incl_counts) - 1)],
  excl_labels = paste("Not ", incl_labels), show_count = TRUE,
  percent_of_total = FALSE, percent_of_prev = FALSE,
  percent_args = list(), format_args = list(), font_size = NULL,
  dpi = NULL, ...)

flow_exclusions_dot(incl_counts, total_label = "Total", incl_labels = LETTERS[seq_len(length(incl_counts) - 1)], excl_labels = paste("Not ", incl_labels), show_count = TRUE, percent_of_total = FALSE, percent_of_prev = FALSE, percent_args = list(), format_args = list(), font_size = NULL, dpi = NULL, ...)

Arguments

percent_args

list of arguments to pass to scales::percent for formatting percentages. Default is an empty list.

format_args

list of arguments to pass to base::format for formatting counts. Default is an empty list.

...

arguments passed to flow_exclusions_dot

Functions

  • flow_exclusions_dot: Just generate the DOT text

Examples

Run this code
# NOT RUN {
flow_exclusions(c(1000, 300, 150, 75, 38))
dot <-
  flow_exclusions_dot(
    incl_counts = c(972, 132, 77, 14),
    total_label = "Total Screened",
    incl_labels = c("Consented", "Completed Study", "BMI <= 30"),
    excl_labels = c("Declined Consent", "Failed to Complete", "BMI > 30")
    )
DiagrammeR::grViz(dot)
flow_exclusions(c(1000, 300, 150, 75, 38),
                percent_of_total = TRUE,
                show_count = FALSE)
flow_exclusions(c(100000, 3000, 1666, 411, 38),
                percent_of_prev = TRUE,
                percent_args = list(decimal.mark = ","),
                format_args = list(scientific = TRUE),
                show_count = TRUE)
# }

Run the code above in your browser using DataLab