selectInputDT_Server {editbl} | R Documentation |
Server part to use a datatable
as select input
Description
Server part to use a datatable
as select input
Usage
selectInputDT_Server(
id,
label = "",
choices,
selected = NULL,
multiple = FALSE
)
Arguments
id |
|
label |
|
choices |
|
selected |
|
multiple |
|
Value
A selection of rows from the data.frame
provided under choices.
Author(s)
Jasper Schelfhout
See Also
shiny::selectInput
. This function can be more convenient for selecting rows
with multiple columns.
Examples
## 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)
}
[Package editbl version 1.0.5 Index]