Shiny TidyModule create ad-hoc (non-validated) PDF table listings by data set and by subject.

Format

R6 class

Input

datalist

A list of data sets. Can be tibbles, data frames, etc. Expects them to have a common ID field (default is USUBJID)

populations

A list of PopulationFilter

options

The options for the module of type reactiveValues with values

subjectDs

If one of the data sets in datalist contains subject level data then provide it here. Default: ADSL

idvar

ID field that is common across all datasets in datalist. Default USUBJID

Output

No output is returned for this module.

See also

Super class

tidymodules::TidyModule -> TableListing

Methods

Public methods

Inherited methods

Method new()

Usage

TableListing$new(...)


Method ui()

Usage

TableListing$ui()


Method server()

Usage

TableListing$server(
  input,
  output,
  session,
  datalist = NULL,
  populations = NULL,
  options = NULL
)


Method clone()

The objects of this class are cloneable with this method.

Usage

TableListing$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { library(bs4Dash) library(subpat) library(tidymodules) tableListMod <- TableListing$new() example_datasets <- list( "ADSL" = data.frame( a = c("x", "z", "y", "x", "z", "x", "x", "y", "x", "y"), b = c(29L, 4L, 15L, 28L, 41L, 25L, 41L, 15L, 6L, 17L), USUBJID = as.character(seq_len(10)), stringsAsFactors = FALSE ), "ADAE" = data.frame( a = c("x", "z", "y", "x", "z", "x", "x", "y", "x", "y"), c = c(1, NA, NA, 1, 2, NA, NA, 4, 3, 1), dates = seq(as.Date("2019-07-10"), as.Date("2019-08-12"), length.out = 10), USUBJID = as.character(seq_len(10)), stringsAsFactors = FALSE ) ) # This is the output from dput on a PopulationFilter # Use the Subpopulation to create them in a shiny application example_populations <- list( # Population 1 structure(list(dataset_names = c("ADSL", "ADAE"), filters = structure(list( filter_1 = structure( list( dataset_name = "ADAE", variable = "c", filterType = "numeric", includeMissing = FALSE, onlyMissing = FALSE, createDate = "Fri Jul 26 18:44:11 2019", minVal = 1L, maxVal = 4L ), .Names = c("dataset_name", "variable", "filterType", "includeMissing", "onlyMissing", "createDate", "minVal", "maxVal"), class = "DatasetFilter") ), .Names = "filter_1" ), name = "New population: 1", createDate = "Fri Jul 26 18:44:05 2019", editDate = "Fri Jul 26 18:44:13 2019"), .Names = c("dataset_names", "filters", "name", "createDate", "editDate"), class = "PopulationFilter") ) ui <- tagList( shinyjs::useShinyjs(), bs4DashPage( sidebar = bs4DashSidebar(disable = TRUE), body = bs4DashBody( tableListMod$ui() ) ) ) # Define server logic server <- function(input, output) { opts <- reactiveValues( idvar = "USUBJID" ) tableListMod$callModule() observe({ reactive(example_datasets) %>1% tableListMod reactive(example_populations) %>2% tableListMod opts %>3% tableListMod }) } # Run the application shinyApp(ui = ui, server = server) }