TableListing.RdShiny TidyModule create ad-hoc (non-validated) PDF table listings by data set and by subject.
R6 class
datalistA list of data sets. Can be tibbles, data frames, etc. Expects them to have a common ID field (default is USUBJID)
populationsA list of PopulationFilter
optionsThe options for the module of type reactiveValues with values
subjectDsIf one of the data sets in datalist contains subject level data then provide it here. Default: ADSL
idvarID field that is common across all datasets in datalist. Default USUBJID
No output is returned for this module.
Other tidymodules:
Filter,
SubgroupManager,
Subgroup,
SubpopulationManager,
Subpopulation,
TTEMapping,
TTE,
VariableSelection
tidymodules::TidyModule -> TableListing
Inherited methods
new()TableListing$new(...)
ui()TableListing$ui()
server()TableListing$server( input, output, session, datalist = NULL, populations = NULL, options = NULL )
clone()The objects of this class are cloneable with this method.
TableListing$clone(deep = FALSE)
deepWhether to make a deep clone.
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) }