I want to execute the if statement only once when the actionButton
is pressed once. So, I want to reset the actionButton
because the if statement is executed continuously. T.T
Here is my code.
output$action_btn <- renderUI({
actionButton("act_btn", class="btn-primary", "active")
})
output$test <- renderPlot({
if(input$act_btn!= 0){
(execution code..)
}
})
input$act_btn <- 0 #This is Error.
When I press the actionButton, It works well.
The problem is input$act_btn <- 0
. I want to reset the value of act_btn.
Is there a method to solve this problem?