r - 在 Windows 上安装 rjags 包

在 R 中安装 Jags 4.0 和 rjags 包时,Jags4.0 和“rjags”包之间的匹配库似乎有问题。
我首先将 Jags 4.0 安装到“C:\Program Files\JAGS\JAGS-4.0.0”,然后尝试使用 R 安装 rjags 包

install.packages("rjags")

我的默认包库是:“C:\Users\AA\Desktop\Documents\R\win-library\3.2”

当我尝试安装 rjags 时,R 显示如下,我无法将已安装的 rjags 加载到我的 R 中。

Installing package into ‘C:/Users/AA/Desktop/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)

我该如何解决这个问题?

编辑以反射(reflect)评论: 加载库 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 sourceforge.net/projects/mcmc-jags/files Error: package or namespace load failed for ‘rjags’

最佳答案

如果有人正在寻找相同的问题作为引用,我收集了@Benjamin 和@BoramLim 在答案中发表的评论。

总结:

jags 安装程序(4.0 版)和 cran 上的 rjags 之间存在版本差异,目前依赖于 jags 3.x 版。您可以在 Sourceforge 上找到 rjags 的工作版本。

来自 blog 的发行说明

After a long gestation period, JAGS 4.0.0 was finally released last week. If you go to the project page on Sourceforge then you should see an appropriate download link for your platform (binary packages for Windows and Mac OS X; source tarball for other platforms). Binary packages are also available for some Linux distributions. See the JAGS homepage for details.

Mac users should note that you need OS X 10.9 or later (i.e. Mavericks, Yosemite, or El Capitan). Older releases are no longer supported.

The rjags package for R has been updated to work with the new release of JAGS. It is not yet uploaded to CRAN, and the version of rjags that is available on CRAN (rjags_3-15) does not work with JAGS 4.0.0. However, you can download rjags_4-3 from Sourceforge. Again, binary packages are available for Windows (.zip) and Mac OS X (.tgz).

https://stackoverflow.com/questions/33268990/

相关文章:

java - 带有 GIT 命令的 ProcessBuilder 没有给出结果

python - Pytest 在使用预定义参数 vai argparse 运行测试时抛出参数错误

jakarta-ee - 缺少 [类(class)] 的类(class)详细信息。为 [class]

python - 标准Django/python单位转换包

c# - 在 WPF 应用程序中单击按钮会重置文化

python - 无法使用 OS X El Capitan pip 安装任何东西

java - Apache HttpClient 临时错误 : NoHttpResponseExce

android - ViewPager setCurrentItem 不流畅

c# - 将可为空的 int 映射到可为空的 int + automapper

django - 如何在 Django 1.8 中动态更改模板路径