forked from jinseob2kim/jsmodule
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrocModule2.Rd
More file actions
101 lines (88 loc) · 2.14 KB
/
Copy pathrocModule2.Rd
File metadata and controls
101 lines (88 loc) · 2.14 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/roc.R
\name{rocModule2}
\alias{rocModule2}
\title{rocModule2: shiny module server for roc analysis- input number of model as integer}
\usage{
rocModule2(
input,
output,
session,
data,
data_label,
data_varStruct = NULL,
nfactor.limit = 10,
design.survey = NULL,
id.cluster = NULL
)
}
\arguments{
\item{input}{input}
\item{output}{output}
\item{session}{session}
\item{data}{Reactive data}
\item{data_label}{Reactuve data label}
\item{data_varStruct}{Reactive List of variable structure, Default: NULL}
\item{nfactor.limit}{nlevels limit in factor variable, Default: 10}
\item{design.survey}{Reactive survey data. default: NULL}
\item{id.cluster}{Reactive cluster variable if marginal model, Default: NULL}
}
\value{
shiny module server for roc analysis- input number of model as integer
}
\description{
shiny module server for roc analysis- input number of model as integer
}
\details{
shiny module server for roc analysis- input number of model as integer
}
\examples{
library(shiny)
library(DT)
library(data.table)
library(jstable)
library(ggplot2)
library(pROC)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
rocUI("roc")
),
mainPanel(
plotOutput("plot_roc"),
tableOutput("cut_roc"),
ggplotdownUI("roc"),
DTOutput("table_roc")
)
)
)
server <- function(input, output, session) {
data <- reactive(mtcars)
data.label <- reactive(jstable::mk.lev(data1))
out_roc <- callModule(rocModule2, "roc",
data = data, data_label = data.label,
data_varStruct = NULL
)
output$plot_roc <- renderPlot({
print(out_roc()$plot)
})
output$cut_roc <- renderTable({
print(out_roc()$cut)
})
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))
)
})
}
}
\seealso{
\code{\link[stats]{quantile}}
\code{\link[data.table]{setkey}}
\code{\link[pROC]{ggroc}}
\code{\link[geepack]{geeglm}}
\code{\link[survey]{svyglm}}
\code{\link[see]{theme_modern}}
}