Description Format Input Output Super class Methods See Also Examples
Provides module for creating and editing subpopulations.
R6 class
datalist
A list of data sets. Can be tibbles, data frames, etc. Expects them to have a common ID field (default is USUBJID
)
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
populations
List of PopulationFilter
S3 objects.
tidymodules::TidyModule
-> SubpopulationManager
new()
SubpopulationManager$new(...)
ui()
SubpopulationManager$ui()
server()
SubpopulationManager$server( input, output, session, datalist = NULL, options = NULL )
clone()
The objects of this class are cloneable with this method.
SubpopulationManager$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other tidymodules:
Filter
,
SubgroupManager
,
Subgroup
,
Subpopulation
,
TTEMapping
,
TTE
,
TableListing
,
VariableSelection
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ## Not run:
library(tidymodules)
library(subpat)
library(bs4Dash)
subpopmod <- SubpopulationManager$new(id = "subpopmodule")
ui <- tagList(
shinyjs::useShinyjs(),
bs4DashPage(
sidebar = bs4DashSidebar(disable = TRUE),
body = bs4DashBody(
subpopmod$ui()
)
)
)
# Define server logic
server <- function(input, output) {
datalist <- reactive({
example_datasets
})
opts <- reactiveValues(
subjectDs = "ADSL",
idvar = "USUBJID"
)
subpopmod$callModule()
observe({
# Pass the data into the module
datalist %>1% subpopmod
# Add the options to the subpopulation manager
opts %>2% subpopmod
})
}
# Run the application
shinyApp(ui = ui, server = server)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.