Description Format Input Output Super class Methods See Also Examples
Subgroup module creates derived variables based on numeric variables.
Subgroup module creates derived variables based on numeric variables.
R6 class
dataA data set (data frame, tibble, etc.) to create subgroups from.
mappingA mapping (reactive list) for 'parameter', and 'parameter_value' variables
parameterThe parameter values (PARAM). If this is provided then parameter_value must be provided as well. Will only perform the analysis where parameter == parameter_value
parameter_valueSee the description for parameter
optionsThe options for the module of type reactiveValues with values
showLabelsBoolean: Do you want the variable labels to show? Generally from haven::read_sas or Hmisc::labels
isvarBoolean: should we show the id variable selector?
subgroupsList of each of the subgroups. Can call as.data.frame on the returned subgroups to create a data frame
tidymodules::TidyModule -> SubgroupManager
new()SubgroupManager$new(...)
ui()SubgroupManager$ui()
server()SubgroupManager$server(input, output, session)
clone()The objects of this class are cloneable with this method.
SubgroupManager$clone(deep = FALSE)
deepWhether to make a deep clone.
Other tidymodules:
Filter,
Subgroup,
SubpopulationManager,
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 | ## Not run:
library(shiny)
library(subpat)
library(bs4Dash)
library(tidymodules)
subgroupManagerModule <- SubgroupManager$new()
ui <- tagList(
shinyjs::useShinyjs(),
bs4DashPage(
sidebar = bs4DashSidebar(disable = TRUE),
body = bs4DashBody(
subgroupManagerModule$ui(),
verbatimTextOutput('subgroupSummary')
)
)
)
server <- function(input, output, session) {
subgroupManagerModule$callModule()
observe({
reactive(mtcars) %>1% subgroupManagerModule
})
output$subgroupSummary <- renderPrint({
print("Subgroups:")
print(summary(subgroupManagerModule$getOutput("subgroups")()))
})
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.