Missing data module
tm_missing_data.RdPresent analysis of missing observations and patients.
Usage
tm_missing_data(
label = "Missing data",
plot_height = c(600, 400, 5000),
plot_width = NULL,
parent_dataname = "ADSL",
ggtheme = c("classic", "gray", "bw", "linedraw", "light", "dark", "minimal", "void",
"test"),
ggplot2_args = list(`Combinations Hist` = teal.widgets::ggplot2_args(labs =
list(caption = NULL)), `Combinations Main` = teal.widgets::ggplot2_args(labs =
list(title = NULL))),
pre_output = NULL,
post_output = NULL
)Arguments
- label
(
character(1)) Label shown in the navigation item for the module. Any label possible except"global_filters"- read more inmappingargument of teal_slices.- plot_height
optional, (
numeric) A vector of length three withc(value, min and max)for a slider encoding the plot height.- plot_width
optional, (
numeric) A vector of length three withc(value, min and max)for a slider encoding the plot width.- parent_dataname
(
character(1)) If thisdatanameexists in then "the by subject"graph is displayed. ForCDISCdata. In nonCDISCdata this can be ignored. Defaults to"ADSL".- ggtheme
optional, (
character)ggplot2theme to be used by default. One ofc("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"). Each theme can be chosen by the user during the session. Defaults to"classic".- ggplot2_args
-
optional, (
ggplot2_args) object created byteal.widgets::ggplot2_args()with settings for all the plots or named list ofggplot2_argsobjects for plot-specific settings. The argument is merged with options variableteal.ggplot2_argsand default module setup.List names should match the following:
c("default", "Summary Obs", "Summary Patients", "Combinations Main", "Combinations Hist", "By Subject").For more details see the vignette:
vignette("custom-ggplot2-arguments", package = "teal.widgets"). - pre_output
(
shiny.tag, optional)
with text placed before the output to put the output into context. For example a title.- post_output
(
shiny.tag, optional) with text placed after the output to put the output into context. For example theshiny::helpText()elements are useful.
Examples
library(nestcolor)
ADSL <- teal.modules.general::rADSL
ADRS <- teal.modules.general::rADRS
app <- teal::init(
data = teal.data::cdisc_data(
teal.data::cdisc_dataset("ADSL", ADSL, code = "ADSL <- teal.modules.general::rADSL"),
teal.data::cdisc_dataset("ADRS", ADRS, code = "ADRS <- teal.modules.general::rADRS"),
check = TRUE
),
modules = teal::modules(
teal.modules.general::tm_missing_data(
ggplot2_args = list(
"Combinations Hist" = teal.widgets::ggplot2_args(
labs = list(subtitle = "Plot produced by Missing Data Module", caption = NULL)
),
"Combinations Main" = teal.widgets::ggplot2_args(labs = list(title = NULL))
)
)
)
)
#> [INFO] 2023-08-14 13:51:38.8838 pid:1296 token:[] teal.modules.general Initializing tm_missing_data
if (interactive()) {
shinyApp(app$ui, app$server)
}