View source: R/two_column_consort.R
two_column_consort | R Documentation |
Creates a simple consort diagram. Is a wrapper for functions that generate more complex consort diagrams.
two_column_consort(variable, top_box_text)
variable |
A character vector where each element is in the following format: " |
top_box_text |
"A character string that provides the text for the top box of the consort diagram, for example "HCV Patient Registry" |
data <- iris %>%
namify %>%
mutate(consort_variable = ifelse(
petal_width < .15,
"2 2 Petal width < 0.15",
ifelse(
petal_length > 6,
"3 2 Petal length > 6",
ifelse(
sepal_width >= 3 & sepal_width < 4,
"4 2 Sepal Width in [3, 4)",
"5 1 Study population"
)
)
))
two_column_consort(
variable = data[,"consort_variable"],
top_box_text = "Iris dataset"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.