My goal is to make a reactive shiny function in R. There are multiple outputs (e.g. tables) which can be bind to a similar function. However I need the function to react on some
This should work instead:
getData <- eventReactive(input$funParameter, {
corrStartDate <- input$StartDate
corrEndDate <- input$EndDate
return(someData(corrStartDate, corrEndDate, input$funParameter))
})
eventReactive
only updates if arguments stated up front change. Practically speaking, this reactive will not trigger if input$StartDate
or input$EndDate
changes.
If this is not what you want, normal reactive functions should work. I.e.:
getData <- reactive({
funParameter <- input$funParameter
corrStartDate <- input$StartDate
corrEndDate <- input$EndDate
return(someData(corrStartDate, corrEndDate, funParameter))
})
which will trigger if any of the inputs change