How to load rjags

狂风中的少年 提交于 2019-12-23 00:42:09

问题


As with a lot of other people, I have issues loading and installing rjags.

I get the error:

library(rjags)
Error : .onLoad failed in loadNamespace() for 'rjags', details:
  call: fun(libname, pkgname)
  error: Failed to locate any version of JAGS version 3

The rjags package is just an interface to the JAGS library
Make sure you have installed JAGS-3.0.0.exe or higher from
http://www.sourceforge.net/projects/mcmc-jags/files

Error: package or namespace load failed for ‘rjags’

I am running R 3.2.2 on a PC (Windows 10), and have the JAGS programme installed at: C:\Program Files\JAGS\JAGS-4.0.0

Is there a way to convince R that JAGS is really, truly and honestly, installed? I even have it open in the background?

Any assistance would be greatly appreciated.


回答1:


I have solved the problem. It appears that rjags is not compatible with JAGS 4.0, you can install JAGS 3.0 at the following address: http://sourceforge.net/projects/mcmc-jags/files/JAGS/3.x/Windows/




回答2:


Although it is not yet on CRAN, you can download the rjags packages for JAGS 4.0.0 from here http://sourceforge.net/projects/mcmc-jags/files/rjags/4/



来源:https://stackoverflow.com/questions/33069823/how-to-load-rjags

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!