flow_exclusions: Generic exclusions flow chart (beta)

Description Usage Arguments Functions Examples

Description

Generate the DOT description for a series of inclusions and exclusions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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)

Example output



PRISMAstatement documentation built on May 9, 2019, 1:03 a.m.