I would like to ask for help with an error I get in a Shiny app when (and only when) it is run through the Binder RStudio. The error affects a drop-down menu titled ‘Dominant modalities’, in which the three color-coded categories are replaced by quote marks. This drop-down is based on the R package shinyWidgets, which I loaded in the app script as well as in the install.R doc. Also, I’m using the latest version of R (having set it in runtime.txt). RStudio is slightly older, though, but I don’t think that could cause this error (could it?).
Below is a screenshot of what the drop-down list should look like, as it does when the app is run from a local RStudio:
If you have a moment to look at this, would you please follow these steps:
From the Session tab on the top, change working directory to the ‘Shiny-app’ folder;
If you wish, look at the code for the Shiny app by opening the ‘Shiny-app’ folder in the ‘Files’ box on the right, and selecting the script ‘Dutch-modality-exclusivity-norms.rmd’;
Run app by calling rmarkdown::run('Dutch-modality-exclusivity-norms.rmd') on the RStudio console.
If you wish, look at the code for the Shiny app by opening the ‘Shiny-app’ folder in the ‘Files’ box on the right, and selecting the script ‘Dutch-modality-exclusivity-norms.rmd’;
Run app by calling rmarkdown::run('./Shiny-app/Dutch-modality-exclusivity-norms.rmd') on the RStudio console.
I don’t know Just launched the app in the hopes it was a problem with loading some CSS or JS files but as far as I can tell that isn’t a problem.
Not knowing anything about R or Shiny myself I’d go with your guess of “old RStudio version”. I think we need someone who understands R/Shiny a bit better than I do (I just copy and pasted your snippet and a pop-up appeared “as if by magic”) to help here.
Besides the RStudio version, the issue might be related to the loading of shinyWidgets, or, perhaps more likely, to a very specific CSS or JS. #justguessingmore
While updating my app just now in my local RStudio, I found the same error with the widget. I can’t seem to trace any difference of versions with regard to the last time I checked. This error had never happened to me on local RStudio before; only on Binder RStudio. It may have been some update of the shinyWidgets package.
I’ve managed to solve the error, on both local and Binder RStudio, by adjusting the HTML code of the labels that are displayed on the widget.
On this basis, I don’t think the error was due to Binder.