inst/extdata/file/module-customers.R

customers_tab_module_ui <- function(id) {
  ns <- NS(id)
  tagList(
    tableOutput(ns("paid_customers_table")),
    tableOutput(ns("free_customers_table")),
    br()
  )
}

customers_tab_module_server <- function(input, output, session, customers_list) {

  output$paid_customers_table <- renderTable({
    subset(customers_list, category == "Paid")
  })

  output$free_customers_table <- renderTable({
    subset(customers_list, category == "Free")
  })

}

Try the supreme package in your browser

Any scripts or data that you put into this service are public.

supreme documentation built on July 8, 2020, 7:18 p.m.