When using Github Actions for old R versions the packages try and install the latest R package version

Hello!

I'm using github actions to test an R package against older versions of R - say for example R 3.3, 3.4, 4.5, and 3.6.

I am running into an issue where despite being in, say, R 3.5 an R package in "Suggests", will not install since it currently depends on R 3.6.

I’m wondering if there’s a way to get the package to use it’s old self? Like, the package that was available in say R 3.5?

The error is like so:

Error: Error: <callr_remote_error: Cannot install packages:
* local::.: Can't install dependency MCMCpack
* MCMCpack: Needs R 3.6>
 in process 9247 
-->
<simpleError: Cannot install packages:
* local::.: Can't install dependency MCMCpack
* MCMCpack: Needs R 3.6>

This can be found at the actions line here

And the github actions file can be found here

I'm wondering if maybe there is a setup that uses a renv lockfile or something like that to preserve the R packages used, or if this is an issue with how the previous versions of R are being set up on the linux runner servers.

pak currently doesn't support this, Do not let pkg_deps() fail even when some dependencies are unavailable · Issue #290 · r-lib/pak · GitHub is tracking this issue.

1 Like

OK thanks so much, @jimhester !

I've used remotes now, with a workaround to install the previous versions of the relevant packages. It is still a work in progress but here is the action if anyone is interested.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.