Description Usage Arguments Value See Also Examples
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.
1 2 3 | tableOutput(outputId)
dataTableOutput(outputId)
|
outputId |
output variable to read the table from |
A table output element that can be included in a panel
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)
}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.