rocModule2: rocModule2: shiny module server for roc analysis- input...

Description Usage Arguments Details Value See Also Examples

View source: R/roc.R

Description

shiny module server for roc analysis- input number of model as integer

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rocModule2(
  input,
  output,
  session,
  data,
  data_label,
  data_varStruct = NULL,
  nfactor.limit = 10,
  design.survey = NULL,
  id.cluster = NULL
)

Arguments

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

Details

shiny module server for roc analysis- input number of model as integer

Value

shiny module server for roc analysis- input number of model as integer

See Also

quantile setkey ggroc geeglm svyglm theme_modern

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
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(rocModule2, "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)))
  })
}

leevenstar/jstest documentation built on Dec. 23, 2021, 12:16 a.m.