...I'm trying to use two groupcheckbox inputs to filter data set but can't seem to work out how to make it work
server <- function(input, output) {
df_amount_subset <- reactive({
req(input$selected_category & input$selected_year)
filter(df_amount, Category %in% input$selected_category & year %in% input$selected_year)
})
The error message is operations are possible only for numeric, logical or complex types
I'm guessing it's because there are two reactive components to the expression but when I tried to write them separately
df_amount_year <- reactive({
req(input$selected_year)
filter(df_amount, year %in% input$selected_year)
})
df_amount_subset <- reactive({
req(input$selected_category)
filter(df_amount_year, Category %in% input$selected_category)
})
this is the error message
no applicable method for 'filter_' applied to an object of class "c('reactiveExpr', 'reactive')"
any help gratefully appreciated, thank you 