edc_crf_plot {EDCimport} | R Documentation |
Show the current CRF status distribution
Description
Generate a barplot showing the distribution of CRF status (Complete, Incomplete, ...) for each dataset of the database.
Usage
edc_crf_plot(
crfstat_col = "CRFSTAT",
...,
details = FALSE,
pal = edc_pal_crf(),
reverse = FALSE,
x_label = "{dataset}",
treat_as_worst = NULL,
datasets = get_datasets(),
lookup = edc_lookup()
)
edc_pal_crf()
Arguments
crfstat_col |
the column name of the CRF status |
... |
unused |
details |
whether to show all the CRF status levels. When |
pal |
the palette, defaulting to the helper |
reverse |
whether to reverse the CRF status level order. |
x_label |
a glue pattern determining the tick label in the x axis. Available variables are the ones of |
treat_as_worst |
a regex for levels that should be treated as worst in the ordering. |
datasets , lookup |
internal |
Value
a ggplot
Source
ggsci:::ggsci_db$lancet[["lanonc"]] %>% dput()
Examples
## Not run:
#import a TM database and use load_database(), then:
edc_crf_plot() + ggtitle(date_extraction)
edc_crf_plot(reverse=TRUE)
edc_crf_plot(details=TRUE, treat_as_worst="No Data")
edc_crf_plot(x_label="{crfname} (N={n_id}, n={nrow})")
p = edc_crf_plot(details=TRUE)
p$data$crfstat %>% unique()
#> [1] "Incomplete" "No Data Locked" "No Data" "Signed"
#> [5] "Partial Monitored" "Monitored" "Complete Locked" "Complete"
## End(Not run)