Description Usage Arguments Details Value See Also Examples
shiny module server for roc analysis
1 2 3 4 5 6 7 8 9 10 11 |
input |
input |
output |
output |
session |
session |
data |
Reactive data |
data_label |
Reactuve data label |
data_varStruct |
Reactive List of variable structure, Default: NULL |
nfactor.limit |
nlevels limit in factor variable, Default: 10 |
design.survey |
Reactive survey data. default: NULL |
id.cluster |
Reactive cluster variable if marginal model, Default: NULL |
shiny module server for roc analysis
shiny module server for roc analysis
quantile
setkey
ggroc
geeglm
svyglm
theme_modern
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 | library(shiny);library(DT);library(data.table);library(jstable);library(ggplot2);library(pROC)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
rocUI("roc")
),
mainPanel(
plotOutput("plot_roc"),
ggplotdownUI("roc"),
DTOutput("table_roc")
)
)
)
server <- function(input, output, session) {
data <- reactive(mtcars)
data.label <- jstable::mk.lev(mtcars)
out_roc <- callModule(rocModule, "roc", data = data, data_label = data.label,
data_varStruct = NULL)
output$plot_roc <- renderPlot({
print(out_roc()$plot)
})
output$table_roc <- renderDT({
datatable(out_roc()$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.