forestcoxServer {jsmodule} | R Documentation |
forestcoxServer:shiny module server for forestcox
Description
Shiny module server for forestcox
Usage
forestcoxServer(
id,
data,
data_label,
data_varStruct = NULL,
nfactor.limit = 10,
design.survey = NULL
)
Arguments
id |
id |
data |
Reactive data |
data_label |
Reactive 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 |
Details
Shiny module server for forestcox
Value
Shiny module server for forestcox
See Also
data.table-package
, setDT
, setattr
TableSubgroupMultiCox
forest_theme
, forest
dml
read_pptx
, add_slide
, ph_with
, ph_location
Examples
library(shiny)
library(DT)
mtcars$vs <- factor(mtcars$vs)
mtcars$am <- factor(mtcars$am)
mtcars$kk <- factor(as.integer(mtcars$disp >= 150))
mtcars$kk1 <- factor(as.integer(mtcars$disp >= 200))
library(shiny)
library(DT)
mtcars$vs <- factor(mtcars$vs)
mtcars$am <- factor(mtcars$am)
mtcars$kk <- factor(as.integer(mtcars$disp >= 150))
mtcars$kk1 <- factor(as.integer(mtcars$disp >= 200))
out <- mtcars
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
forestcoxUI("Forest")
),
mainPanel(
tabsetPanel(
type = "pills",
tabPanel(
title = "Data",
DTOutput("tablesub"),
),
tabPanel(
title = "figure",
plotOutput("forestplot", width = "100%"),
ggplotdownUI("Forest")
)
)
)
)
)
server <- function(input, output, session) {
data <- reactive(out)
label <- reactive(jstable::mk.lev(out))
outtable <- forestcoxServer("Forest", data = data, data_label = label)
output$tablesub <- renderDT({
outtable()[[1]]
})
output$forestplot <- renderPlot({
a
outtable()[[2]]
})
}
[Package jsmodule version 1.5.6 Index]