table_with_settings: table_with_settings module

table_with_settingsR Documentation

table_with_settings module

Description

[Stable]

Usage

table_with_settings_ui(id, ...)

table_with_settings_srv(id, table_r, show_hide_signal = reactive(TRUE))

Arguments

id

An ID string that corresponds with the ID used to call the module's UI function.

...

(character)
Useful for providing additional HTML classes for the output tag.

table_r

(reactive)
reactive expression that yields an rtable object (ElementaryTable or TableTree)

show_hide_signal

(⁠reactive logical⁠, optional)
a mechanism to allow modules which call this module to show/hide the table_with_settings UI.

Value

A shiny module.

Examples

library(shiny)
library(rtables)
library(magrittr)
app <- shinyApp(
  ui = fluidPage(
    table_with_settings_ui(
      id = "table_with_settings"
    )
  ),
  server = function(input, output, session) {
    table_r <- reactive({
      l <- basic_table() %>%
        split_cols_by("ARM") %>%
        analyze(c("SEX", "AGE"))

      tbl <- build_table(l, DM)

      tbl
    })

    table_with_settings_srv(id = "table_with_settings", table_r = table_r)
  }
)
if (interactive()) {
  app
}


teal.widgets documentation built on May 29, 2024, 2:41 a.m.