Description Usage Arguments Details Value Examples
Shiny modulde server for Cox's model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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 |
default.unires |
Set default independent variables using univariate analysis. |
limit.unires |
Change to default.unires = F if number of independent variables > limit.unires, Default: 20 |
id.cluster |
reactive cluster variable if marginal cox model, Default: NULL |
ties.coxph |
'coxph' ties option, one of 'efron', 'breslow', 'exact', default: 'erfon' |
Shiny modulde server for Cox's model.
Shiny modulde server for Cox's model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 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)
})
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.