Hello everybody. I have a problem for my first Shiny app. In the same reactive function (in the server part), I wrote this :
**type1<-NULL**
** for (j in 1:length(noms)){**
** if(dataz[1,j]==typeActifs[1]){**
** type1<-cbind(type1,j)**
** }**
** }**
** type1<-as.vector(type1)**
contr<-c(glue("minsumW[type1] = {input$contrainte_1}"), glue("maxsumW[type1] = {input$contrainte_2}")
However when I launch my apply, I got an error saying "can't find type1 object". Normally, the quotation marks are not a problem : when I use this exact same code in a regular R file (I mean, not a Shiny environment), the programm can read "type1" without any problem and everythings work perfectly.
I also tried :
contr<-c(glue("minsumW[{type1}] = {input$contrainte_1}"), glue("maxsumW[{type1}] = {input$contrainte_2}")
In this case the program is able to find the "type1" object but the results are not correct. I expect "contr" to be a vector containing 2 conditions, but in this case "contr" become a vector containing length(type1)*2 conditions.
The problem is that all objects values contained in "type1" are affected to input$contrainte_1. Or, this is the sum of all those values that are supposed to be affected to input$contrainte_1 (and input$contrainte_2).
I would like "type1" to be readed as a whole object by the program. Can somebody helps me ?
Thanks you for reading,
Robin