I have selectInput
dropdown like this:
selectInput("locInput", "Location", choices=c("All","New Mexico", "Colorado", "California"))
What I want to achieve is to make selectInput by default not filter by anything, as in when "All" is selected then it should list all observations (so from California, Colorado etc.) So what I tried to do is create simple logic for this:
server <- function(input, output) {
filtered<-reactive({
shows %>%
filter(Length >= input$lenInput[1],
Length <= input$lenInput[2],
if (input$locInput != "All"){
Location==input$locInput
})
But this doesn't seem to work. Any ideas what can I change in order to make it work correctly?
See Question&Answers more detail:os