crf_status_plot | R Documentation |
Generate a barplot showing the distribution of CRF status (Complete, Incomplete, ...) for each dataset of the database.
crf_status_plot(
crfstat_col = "CRFSTAT",
...,
details = FALSE,
pal = edc_pal_crf(),
crfstat_lvls = names(pal),
x_label = "{dataset}",
treat_as_worst = NULL
)
edc_pal_crf()
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 |
crfstat_lvls |
the CRF status levels, from "best" to "worst". The plot is ordered by the "worst" level. |
x_label |
a glue pattern determining the tick label in the x axis. Available variables are |
treat_as_worst |
a regex for levels that should be treated as worst in the ordering |
a ggplot
ggsci:::ggsci_db$lancet[["lanonc"]] %>% dput()
## Not run:
#import a TM database and use load_list(), then:
crf_status_plot() + ggtitle(date_extraction)
crf_status_plot(pal=rev(edc_pal_crf()))
crf_status_plot(details=TRUE, treat_as_worst="No Data")
crf_status_plot(x_label="{crfname} (N={n_id}, n={nrow})")
p = crf_status_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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.