timerocUI | R Documentation |
Shiny module UI for time-dependent roc analysis
timerocUI(id)
id |
id |
Shiny module UI for time-dependent roc analysis
Shiny module UI for time-dependent roc analysis
library(shiny)
library(DT)
library(data.table)
library(jstable)
library(ggplot2)
library(timeROC)
library(survIDINRI)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
timerocUI("timeroc")
),
mainPanel(
plotOutput("plot_timeroc"),
ggplotdownUI("timeroc"),
DTOutput("table_timeroc")
)
)
)
server <- function(input, output, session) {
data <- reactive(mtcars)
data.label <- jstable::mk.lev(mtcars)
out_timeroc <- callModule(timerocModule, "timeroc",
data = data, data_label = data.label,
data_varStruct = NULL
)
output$plot_timeroc <- renderPlot({
print(out_timeroc()$plot)
})
output$table_timeroc <- renderDT({
datatable(out_timeroc()$tb,
rownames = F, editable = F, extensions = "Buttons",
caption = "ROC results",
options = c(jstable::opt.tbreg("roctable"), list(scrollX = TRUE))
)
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.