I wish I could use the same reactive variable several times with different values of the same species.
ui <- fluidPage(
actionButton("btn_change", "Change Values"),
actionButton("btn_print","Print values")
)
server <- function(input, output) {
a <- F
c <- F
observeEvent(input$btn_change, {
a <<- F
c <<- T
})
observeEvent(input$btn_print, {
cat("a =",a,"c =",c,"n")
})
}
shinyApp(ui, server)
two variables a and b start on the server, but below they reassign new values but of the same type. I want to do the same but with reactive variables. thank you for your answer