I'm trying to make an App for the project that I'm working on. My goal is to make it reactive so when you pick some option, or press a "Click When Done" button, the server adds widgets to the UI or makes changes to the background data.
I'm having trouble doing this because R won't let me refer to input types in the server if they are created in some other part of the server. For example, I make a button called "DataReady":
actionButton("DataReady","Click When Done")
This is in a section of the server and it appears when someone chooses one of the options in: radioButtons("choice", h3("Choose Tool"), choices = list("ANOVA with saved data", "Add new data", "Boxplot maker"))
Which is in the regular UI.
I then try to make another widget appear from the server (with renderUI) but only after the button has been pressed: if (input$DataReady >0){
...
R keeps giving me errors here because when it is loading the App, input$DataReady is NULL, which doesn't count as a boolean.
Is there something I can do here to make this work?