dataTableOutput | R Documentation |
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.
dataTableOutput(outputId, width = "100%", height = "auto", fill = TRUE)
DTOutput(outputId, width = "100%", height = "auto", fill = TRUE)
renderDataTable(
expr,
server = TRUE,
env = parent.frame(),
quoted = FALSE,
funcFilter = dataTablesFilter,
future = FALSE,
outputArgs = list(),
...
)
renderDT(
expr,
server = TRUE,
env = parent.frame(),
quoted = FALSE,
funcFilter = dataTablesFilter,
future = FALSE,
outputArgs = list(),
...
)
outputId |
output variable to read the table from |
width |
the width of the table container |
height |
the height of the table container |
fill |
passed to |
expr |
an expression to create a table widget (normally via
|
server |
whether to use server-side processing. If |
env |
The parent environment for the reactive expression. By default,
this is the calling environment, the same as when defining an ordinary
non-reactive expression. If |
quoted |
If it is |
funcFilter |
(for expert use only) passed to the |
future |
whether the server-side filter function should be executed as a future or as a standard synchronous function. If true, the future will be evaluated according to the session's plan. |
outputArgs |
A list of arguments to be passed through to the implicit
call to |
... |
ignored when |
https://rstudio.github.io/DT/shiny.html
if (interactive()) {
library(shiny)
library(DT)
shinyApp(
ui = fluidPage(fluidRow(column(12, DTOutput('tbl')))),
server = function(input, output) {
output$tbl = renderDT(
iris, options = list(lengthChange = FALSE)
)
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.