Description Usage Arguments References Examples
These two functions are like most fooOutput()
and renderFoo()
functions in the shiny package. The former is used to create a
container for table, and the latter is used in the server logic to render the
table.
1 2 3 | dataTableOutput(outputId, width = "100%", height = "auto")
renderDataTable(expr, server = TRUE, env = parent.frame(), quoted = FALSE, ...)
|
outputId |
output variable to read the table from |
width |
the width of the table container |
height |
the height of the table container |
expr |
an expression to create a table widget (normally via
|
server |
whether to use server-side processing. If |
env |
The environment in which to evaluate |
quoted |
Is |
... |
ignored when |
http://rstudio.github.io/DT/shiny.html
1 2 3 4 5 6 7 8 9 10 11 | if (interactive()) {
library(shiny)
shinyApp(
ui = fluidPage(fluidRow(column(12, DT::dataTableOutput('tbl')))),
server = function(input, output) {
output$tbl = DT::renderDataTable(
iris, options = list(lengthChange = FALSE)
)
}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.