且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

仅在我单击 Shiny 中的操作按钮后才更新服务器上的内容

更新时间:2023-01-24 07:43:26

submitButton is just made for this.


If you want to use actionButton instead, simply use isolate to avoid refresh based on value changes, and add the input$Buttonin the code like:

output$Minimal_Example <- renderPrint({
  input$Button
  Age <- isolate(input$Age)
  Sex <- isolate(input$ChosenSex)
  c(Age, Sex)
})