Skip to contents

Present analysis of missing observations and patients.

Usage

tm_missing_data(
  label = "Missing data",
  plot_height = c(600, 400, 5000),
  plot_width = NULL,
  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) Label shown in the navigation item for the module.

plot_height

optional, (numeric) A vector of length three with c(value, min and max) for a slider encoding the plot height.

plot_width

optional, (numeric) A vector of length three with c(value, min and max) for a slider encoding the plot width.

ggtheme

optional, (character) ggplot2 theme to be used by default. One of c("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 by teal.widgets::ggplot2_args() with settings for all the plots or named list of ggplot2_args objects for plot-specific settings. The argument is merged with options variable teal.ggplot2_args and 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 the shiny::helpText() elements are useful.

Examples

library(scda)

ADSL <- synthetic_cdisc_data("latest")$adsl
ADRS <- synthetic_cdisc_data("latest")$adrs

app <- init(
  data = cdisc_data(
    cdisc_dataset("ADSL", ADSL, code = "ADSL <- synthetic_cdisc_data(\"latest\")$adsl"),
    cdisc_dataset("ADRS", ADRS, code = "ADRS <- synthetic_cdisc_data(\"latest\")$adrs"),
    check = TRUE
  ),
  modules = modules(
    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] 2022-06-14 17:42:46.5879 pid:1110 token:[] teal.modules.general Initializing tm_missing_data
if (FALSE) {
shinyApp(app$ui, app$server)
}