BiologicalRecordsCentre / BRCindicators

An R package for creating indicators from trends data
4 stars 11 forks source link

Fix to Jags detection error #88

Open DylanCarbone opened 2 months ago

DylanCarbone commented 2 months ago

This fixes an error I introduced with the detection of JAGS. The previous approach relied on runjags::findjags(). This in turn relies on the activation of rjags through library(rjags). However, the library load fails if JAGS is not installed. During CI, rjags could not be loaded as github actions does not have access the jags, and this would cause CI to fail. In summary the JAGS detection could only take place if JAGS was already installed and rjags loaded, but this approach would cause failures in continuous integration as well users without jags trying to load sparta. The new approach simply searches common install locations for the JAGS executable.