When you are installing R packages through CRAN, you may sometimes find packages failing to install, reporting that a dependency relies on a very new version of R.
One way to handle this is to specify an MRAN snapshot for the CRAN installer in your environment.
First, you will add your R packages to the CRAN installer.
Then, click the gear icon next to R (CRAN) icon and add a date in the following form:
This will direct the CRAN installer to use an older index of packages, instead of the most recent one. A good default is to go with the release date of the next major version of R, which is the latest point in time when all of the packages in the index must have supported the one that preceded it.
A few useful snapshots:
- https://cran.microsoft.com/snapshot/2020-04-23/ for R 3.6
- https://cran.microsoft.com/snapshot/2019-04-15/ for R 3.5
- https://cran.microsoft.com/snapshot/2018-04-01/ for R 3.4
- https://cran.microsoft.com/snapshot/2017-03-15/ for R 3.3