I am using a combination of ‘runtime.txt’ and ‘install.R’ to set up my configuration. It used to work just fine until a couple of days ago. Now, the binder runs but the packages (e.g., “tidyverse”) specified in ‘install.R’ fail to load. Examining the build logs suggests that the problem occurs because MRAN is down. E.g., the following URL:
We recently added a new way to install R packages and RStudio to repo2docker (the tool doing the image building). It uses conda-forge instead of MRAN. Might be worth trying out while MRAN is unavailable.
An example on how to do this is in https://github.com/betatim/r-conda. The basic pattern is to take the R package name and add a r- to the beginning, then add it to environment.yml.
This should speed up building your repository on mybinder.org because the conda packages don’t need compiling. Right now installing tidyverse from MRAN takes an hour or so because we have to compile lots of things.
Another side benefit could be that the conda package mirror has better uptime than MRAN.
A downside of this approach could be that not all the packages you need are available on conda-forge. For this we need more people using this approach to get some feeling for how good/bad the coverage is.
It would be great if you have a moment to try this out and send feedback/an experience report
Not every R package is on conda-forge yet. However it should not be super difficult to add a new one and everyone can do it (no special permission needed), even if you aren’t the package author (https://conda-forge.org/#add_recipe).