I am trying to assign a reactive variable(using shiny inputs inside) global scope with <<- operator in a user defined function which is placed in server. I am not able to access it in other user defined function placed in server as it is throwing error : variable not found. I also want to know any debugging technique that I can apply to know more about cause of the above error.
Asked
Active
Viewed 58 times
0
-
3I tend to discourage `<<-` in general ... in shiny, it can be even murkier. I suggest you look into [shiny modules](https://shiny.rstudio.com/articles/modules.html) and use that method instead. Having said that, without seeing your code, it is rather difficult to say. Please make this question more *reproducible*, including sample code (including listing non-base R packages). Refs: https://stackoverflow.com/questions/5963269, https://stackoverflow.com/help/mcve, and https://stackoverflow.com/tags/r/info. – r2evans Jul 23 '19 at 19:40
-
Where do you want to use this variable? If you want to create a reactive variable on server and use it in UI by assigning it with <<- then this approach will not work. – TimTeaFan Jul 23 '19 at 19:51