Correctly installing non-CRAN dependencies

I'm sure this is a newbie question (well, I am a newbie with GitHub Actions). I'm developing a package (https://github.com/oharar/LatentINLA) that uses INLA, which is not on CRAN. I can't work out how to install INLA correctly: at the uses: r-lib/actions/setup-r-dependencies@v1 stage it fails because it can't find INLA on CRAN, and I can't find any documentation about how to change this.

My R-CMD-check file is here, if you want to wince at what I've tried:

Have you tried moving the install INLA step after setup-r-dependencies?

1 Like

:wave: @BobOHara!

I think you'll need to

1 Like

Thanks. Now at least I'm getting a different error. :slight_smile:

Now at Install pak I get the following error:

The downloaded binary packages are in
/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpdZpwrt/downloaded_packages

Error: Error: <callr_remote_error: missing value where TRUE/FALSE needed>
in process 6431
-->
<async_rejected in if (any(bad <- types == "")) { stop("Can't parse remotes: ", paste(refs[bad], collapse = ", "))}: missing value where TRUE/FALSE needed>

If it helps, the log is here:
https://github.com/oharar/LatentINLA/runs/3534623088?check_suite_focus=true
The Github workflow is linked to above:
And the DESCRIPTION is here:

I'm sure the problem is due to me not knowing what I'm doing: there are too many moving parts that I don't understand.

I had it after that at some point, and it wasn't working. :sniff:

You were close to getting this working.

  1. You were missing a comma in the DESCRIPTION file
  2. We need to include the additional repo in the CRAN repositories, so pak knows where to install it from.

You can do the second by setting the CRAN environment variable to the additional repositories you were trying to use.

I opened a PR with these changes (https://github.com/oharar/LatentINLA/pull/6)

3 Likes

Many thanks, everybody and especially Jim and maelle for getting this sorted.

1 Like

Adding a link to the PR by @jimhester that finally fixed the workflow. :rocket:

1 Like

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.