| tb1moduleUI {jsmodule} | R Documentation | 
tb1moduleUI: table 1 module UI.
Description
Table 1 shiny module UI for descriptive statistics.
Usage
tb1moduleUI(id)
Arguments
id | 
 id  | 
Details
Table 1 shiny module UI for descriptive statistics.
Value
Table 1 module UI.
Examples
library(shiny)
library(DT)
library(data.table)
library(jstable)
ui <- fluidPage(
  sidebarLayout(
    sidebarPanel(
      tb1moduleUI("tb1")
    ),
    mainPanel(
      DTOutput("table1")
    )
  )
)
server <- function(input, output, session) {
  data <- reactive(mtcars)
  data.label <- reactive(jstable::mk.lev(mtcars))
  out_tb1 <- callModule(tb1module2, "tb1",
    data = data, data_label = data.label,
    data_varStruct = NULL
  )
  output$table1 <- renderDT({
    tb <- out_tb1()$table
    cap <- out_tb1()$caption
    out.tb1 <- datatable(tb, rownames = T, extension = "Buttons", caption = cap)
    return(out.tb1)
  })
}
[Package jsmodule version 1.5.6 Index]