First thanks in advance for providing any insight into the problem I am experiencing now.
I am using checkboxgroupinput widget to develop a simple kmeans clustering app that allows users to choose their own features. There is a slight annoyance that I want to solve: the kmeans algorithm runs every time you check (or uncheck) a feature. For example, if one chooses feature A B and C, the model will 3 times, first A only, then A and B and then A, B and C; if the users wants to try D, E, and F, then the model runs 6 more times (unchecking A B and C one by one, then repeat for D, E and F).
Thanks again.
Is there a way to just run the model twice, first A, B and C as a list and then D, E and F as a list?
CodePudding user response:
I would add an action button, after a selecting the features, users need to click a button that you can manage by 'eventReactive' or 'observeEvent' for running your model. you could use shinyWidgets::actionBttn or shiny::actionButton I found an example for observeEvent vs. eventReactive