With Travis CI testing older R versions, what is the best way to handle package ‘***’ is not available (for R version ***)?

Viewed 56

I have an R package I wish to support back to R 3.4.4 With my most recent commit the older R builds error with this:

package ‘XML’ is not available (for R version 3.6.3)

And I imagine more packages may flag up in future.

On a local machine I would simply install a compatible older version of XML from cran. I have a small R script to do this.

How do I ask Travis CI to install compatible versions of packages in my DESCRIPTION file?

.travis.yml file

language: R
cache: packages
sudo: false
dist: bionic
cran: http://cran.rstudio.com

branches:
  only:
  - /.*/
  
r:
  - 3.4
  - 3.6
  - release
  - devel
0 Answers
Related