View source: R/sortableTableOutput.R
sortableTableOutput | R Documentation |
Render a standard HTML table with table rows sortable by drag and drop. The
order of table rows is recorded in input$<outputId>_order
.
sortableTableOutput(outputId)
outputId |
output variable to read the table from |
A table output element that can be included in a panel
shiny::tableOutput, sortableRadioButtons, sortableCheckboxGroupInput, sortableTabsetPanel, selectableTableOutput
## Only run this example in interactive R sessions
if (interactive()) {
shinyApp(
ui = fluidPage(
verbatimTextOutput("rows"),
sortableTableOutput("tbl")
),
server = function(input, output) {
output$rows <- renderPrint({input$tbl_row_index})
output$tbl <- renderTable(mtcars, rownames = TRUE)
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.