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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…