forked from jinseob2kim/jsmodule
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoxModule.Rd
More file actions
91 lines (75 loc) · 2.01 KB
/
Copy pathcoxModule.Rd
File metadata and controls
91 lines (75 loc) · 2.01 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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coxph.R
\name{coxModule}
\alias{coxModule}
\title{coxModule: shiny modulde server for Cox's model.}
\usage{
coxModule(
input,
output,
session,
data,
data_label,
data_varStruct = NULL,
nfactor.limit = 10,
design.survey = NULL,
default.unires = T,
limit.unires = 20,
id.cluster = NULL,
ties.coxph = "efron",
vec.event = NULL,
vec.time = 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{default.unires}{Set default independent variables using univariate analysis.}
\item{limit.unires}{Change to default.unires = F if number of independent variables > limit.unires, Default: 20}
\item{id.cluster}{reactive cluster variable if marginal cox model, Default: NULL}
\item{ties.coxph}{'coxph' ties option, one of 'efron', 'breslow', 'exact', default: 'erfon'}
\item{vec.event}{event variables as vector for survival analysis, Default: NULL}
\item{vec.time}{time variables as vector for survival analysis, Default: NULL}
}
\value{
Shiny modulde server for Cox's model.
}
\description{
Shiny modulde server for Cox's model.
}
\details{
Shiny modulde server for Cox's model.
}
\examples{
library(shiny)
library(DT)
library(data.table)
library(jstable)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
coxUI("cox")
),
mainPanel(
DTOutput("coxtable")
)
)
)
server <- function(input, output, session) {
data <- reactive(mtcars)
data.label <- reactive(jstable::mk.lev(mtcars))
out_cox <- callModule(coxModule, "cox",
data = data, data_label = data.label,
data_varStruct = NULL
)
output$coxtable <- renderDT({
datatable(out_cox()$table, rownames = T, caption = out_cox()$caption)
})
}
}