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.
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.