TTE.Rd
Shiny TidyModule
to perform exploratory survival analysis.
Features Kaplan Meier survival function estimation and event summaries as well as Cox Proportional Hazard models.
R6 class
Other tidymodules:
Filter
,
SubgroupManager
,
Subgroup
,
SubpopulationManager
,
Subpopulation
,
TTEMapping
,
TableListing
,
VariableSelection
tidymodules::TidyModule
-> TTE
Inherited methods
new()
TTE$new(...)
coxUi()
TTE$coxUi()
coxForestUi()
TTE$coxForestUi()
coxVariablesUi()
TTE$coxVariablesUi()
plotUi()
TTE$plotUi()
eventTableUi()
TTE$eventTableUi()
standardUi()
TTE$standardUi()
ui()
TTE$ui()
server()
TTE$server(input, output, session)
clone()
The objects of this class are cloneable with this method.
TTE$clone(deep = FALSE)
deep
Whether to make a deep clone.
if (FALSE) { 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) }