#Define UI ----ui <-fluidPage(# Copy the line below to make a select box selectInput("select", label =h3("Select box"), choices = tx_counties, multiple =TRUE),dataTableOutput(outputId ="stormtable") )
`shiny::dataTableOutput()` is deprecated as of shiny 1.8.1.
Please use `DT::DTOutput()` instead.
Since you have a suitable version of DT (>= v0.32.1), shiny::dataTableOutput() will automatically use DT::DTOutput() under-the-hood.
If this happens to break your app, set `options(shiny.legacy.datatable = TRUE)` to get the legacy datatable implementation (or `FALSE` to squelch this message).
See <https://rstudio.github.io/DT/shiny.html> for more information.
# Define server logic ----server <-function(input, output) { output$stormtable <- DT::renderDataTable({if (is.null(input$select) ||length(input$select) ==0) {# No selection made, return the full dataset filtered_data <- storms } else {# Filter the dataset based on selections filtered_data <- storms %>%filter(location %in% input$select) }# Return the datatable DT::datatable(filtered_data) })}# Run the app ----shinyApp(ui = ui, server = server)