TTE: Time to event (TTE) module

Description Format Super class Methods See Also Examples

Description

Shiny TidyModule to perform exploratory survival analysis. Features Kaplan Meier survival function estimation and event summaries as well as Cox Proportional Hazard models.

Format

R6 class

Super class

tidymodules::TidyModule -> TTE

Methods

Public methods

Inherited methods

Method new()

Usage
TTE$new(...)

Method coxUi()

Usage
TTE$coxUi()

Method coxForestUi()

Usage
TTE$coxForestUi()

Method coxVariablesUi()

Usage
TTE$coxVariablesUi()

Method plotUi()

Usage
TTE$plotUi()

Method eventTableUi()

Usage
TTE$eventTableUi()

Method standardUi()

Usage
TTE$standardUi()

Method ui()

Usage
TTE$ui()

Method server()

Usage
TTE$server(input, output, session)

Method clone()

The objects of this class are cloneable with this method.

Usage
TTE$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other tidymodules: Filter, SubgroupManager, Subgroup, SubpopulationManager, Subpopulation, TTEMapping, 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
## Not run: 
library(shiny)
library(subpat)
library(tidymodules)

tteMappingModule <- TTEMapping$new()
tteModule <- TTE$new()

ui <- fluidPage(
  titlePanel("TTE Analysis"),
  
  sidebarLayout(
    sidebarPanel(
      selectInput('dataset', 'survival dataset', choices = data(package = "survival")$results[, "Item"], selected = "lung"),
      tteMappingModule$ui()
    ),
    mainPanel(
      # Use the base shiny UI
      tteModule$standardUi()
    )
  )
)

server <- function(input, output, session) {
  
  options <- reactiveValues(
    makePlotly = FALSE,
    conftype = "log-log"
  )
  
  optionsMapping <- reactiveValues(
    population = FALSE,
    parameter = FALSE,
    parameter_value = FALSE,
    adam = FALSE
  )
  
  tteMappingModule$callModule()
  tteModule$callModule()
  
  # Load the data set from the survival package
  data_reactive <- reactive({
    req(input$dataset)
    ds <- trimws(gsub("\\(.*\\)", "", input$dataset))
    data(list = ds, package = "survival")
    
    # Reset the modules
    tteMappingModule <- TTEMapping$new()
    tteModule <- TTE$new()
    tteMappingModule$callModule()
    tteModule$callModule()
    
    
    get(ds)
  })
  
  observe({
    options %>4% tteModule
    optionsMapping %>2% tteMappingModule
    data_reactive %>1% tteModule
    # Get the mapping and pass into the TTE module
    data_reactive %>1% tteMappingModule %1>2% tteModule
  })
}

# Run the application
shinyApp(ui = ui, server = server)

## End(Not run)

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