tableOutput: Create a table output element

Description Usage Arguments Value See Also Examples

View source: R/bootstrap.R

Description

Render a renderTable or renderDataTable within an application page. renderTable uses a standard HTML table, while renderDataTable uses the DataTables Javascript library to create an interactive table with more features.

Usage

1
2
3
tableOutput(outputId)

dataTableOutput(outputId)

Arguments

outputId

output variable to read the table from

Value

A table output element that can be included in a panel

See Also

renderTable, renderDataTable.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Only run this example in interactive R sessions
if (interactive()) {
  # table example
  shinyApp(
    ui = fluidPage(
      fluidRow(
        column(12,
          tableOutput('table')
        )
      )
    ),
    server = function(input, output) {
      output$table <- renderTable(iris)
    }
  )


  # DataTables example
  shinyApp(
    ui = fluidPage(
      fluidRow(
        column(12,
          dataTableOutput('table')
        )
      )
    ),
    server = function(input, output) {
      output$table <- renderDataTable(iris)
    }
  )
}

ymd526442121/Rproject_shiny documentation built on May 4, 2019, 5:31 p.m.