In Rshiny UI I have two selectinputs years and tunnel:

```
selectInput("years", "Year", seq(min(df_map$jaar),max(df_map$jaar),1), selected = max(df_map$jaar), multiple = FALSE),
selectInput("tunnel", "Tunnel", c("ALL", sort(unique(df_map$tunnelnaam))), multiple = FALSE)

```

In Rshiny Server I would like to subset as follows so I can select ALL tunnels as well as a single tunnel:

```
filteredData <- reactive({
    if(input$tunnel == "ALL") {
      subset(df_map, jaar %in% input$years)
    }
    if(input$tunnel != "ALL") {
      subset(df_map, jaar %in% input$years & tunnelnaam %in% input$tunnel)
    }
  })

```

I am getting the following error when choosing ALL however:

```
addCircleMarkers requires non-NULL longitude/latitude values

```

It seems filteredData() is not working when ALL tunnels are selected. Does anyone have an idea how to select ALL tunnels as well as single tunnels in Rshiny? Any help would be greatly appreciated.