forestglmServer | R Documentation |
Shiny module server for forestglm
forestglmServer(
id,
data,
data_label,
family,
data_varStruct = NULL,
nfactor.limit = 10,
design.survey = NULL
)
id |
id |
data |
Reactive data |
data_label |
Reactive data label |
family |
family, "gaussian" or "binomial" or 'poisson' or 'quasipoisson' |
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 |
Shiny module server for forestglm
Shiny module server for forestglm
TableSubgroupMultiGLM
data.table-package
,setDT
, setattr
cor
, coef
surveysummary
, svytable
forest_theme
, forest
dml
read_pptx
, add_slide
, ph_with
, ph_location
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))
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
forestglmUI("Forest")
),
mainPanel(
tabsetPanel(
type = "pills",
tabPanel(
title = "Data",
DTOutput("tablesub"),
),
tabPanel(
title = "figure",
plotOutput("forestplot", width = "100%"),
ggplotdownUI("Forest")
)
)
)
)
)
out <- mtcars
server <- function(input, output, session) {
data <- reactive(out)
label <- reactive(jstable::mk.lev(out))
outtable <- forestglmServer("Forest", data = data, data_label = label, family = "binomial")
output$tablesub <- renderDT({
outtable()[[1]]
})
output$forestplot <- renderPlot({
outtable()[[2]]
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.