I'm new to shiny and trying to accomplish rather a simple task using an action button:
- User clicks a button and a function is called
- This function does some calculations using input variables and updates/creates several global variables (
reactiveValues, probably inside anobserveblock?) - I'd like to display those values back on the UI (using
render*function) - Whenever user changes input values, the UI is automatically updated
Relevant code bits are:
server.R
...
rv <- reactiveValues()
observe({
if(input$run){
rv$a <- someFunc(input$aa)
}
})
output$msg = renderText({ rv$a })
...
ui.R
...
selectInput("aa", ...)
...
actionButton("run", "Run")
...
textOutput("msg")
How can I change msg based on the input aa each time user clicks the button?
