View source: R/selectInputDT.R
selectInputDT_Server | R Documentation |
datatable
as select inputServer part to use a datatable
as select input
selectInputDT_Server(
id,
label = "",
choices,
selected = NULL,
multiple = FALSE
)
id |
|
label |
|
choices |
|
selected |
|
multiple |
|
A selection of rows from the data.frame
provided under choices.
Jasper Schelfhout
shiny::selectInput
. This function can be more convenient for selecting rows
with multiple columns.
## Only run this example in interactive R sessions
if(interactive()){
ui <- selectInputDT_UI('id')
data <- data.frame(id = 1:3, name = letters[1:3])
server <- function(input,output, session){
selected = selectInputDT_Server('id', choices = data, selected = data[1,] )
observe({print(selected())})
}
shiny::shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.