How do you select rows of data from a dataframe or table using checkboxes? I've done the following code but it seems the checkbox items are columns and does not really display the results.
Thanks for your help.
server.R
shinyServer(function(input, output) {
dataset<-reactive({
data(cars)
cars
})
output$choose_data <- renderUI({
checkboxGroupInput("dtab", "Data Table", dataset())
})
dataset2<-reactive({
input$dtab
})
output$data_table <- renderTable({
data2()
})
})
ui.R
shinyUI(pageWithSidebar(
headerPanel(""),
sidebarPanel(
uiOutput("choose_data"),
br()
),
mainPanel(
wellPanel("Data", tableOutput("data_table")
))))