SubgroupManager: Subgroup module creates derived variables based on numeric...

Description Format Input Output Super class Methods See Also Examples

Description

Subgroup module creates derived variables based on numeric variables.

Subgroup module creates derived variables based on numeric variables.

Format

R6 class

Input

data

A data set (data frame, tibble, etc.) to create subgroups from.

mapping

A mapping (reactive list) for 'parameter', and 'parameter_value' variables

parameter

The 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_value

See the description for parameter

options

The options for the module of type reactiveValues with values

showLabels

Boolean: Do you want the variable labels to show? Generally from haven::read_sas or Hmisc::labels

isvar

Boolean: should we show the id variable selector?

Output

subgroups

List of each of the subgroups. Can call as.data.frame on the returned subgroups to create a data frame

Super class

tidymodules::TidyModule -> SubgroupManager

Methods

Public methods

Inherited methods

Method new()

Usage
SubgroupManager$new(...)

Method ui()

Usage
SubgroupManager$ui()

Method server()

Usage
SubgroupManager$server(input, output, session)

Method clone()

The objects of this class are cloneable with this method.

Usage
SubgroupManager$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other tidymodules: Filter, Subgroup, SubpopulationManager, Subpopulation, TTEMapping, TTE, TableListing, VariableSelection

Examples

 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)

Novartis/subpat documentation built on April 11, 2020, 3:11 p.m.