我想安装在CRAN中找不到的软件包。
下面是该软件包的下载链接。该软件包使用JAGS,其中我拥有64位4.3.0版本。已安装rjags
和r2jags
软件包。 Rtools连接到该路径。我用
Sys.which("make")
## "C:\\rtools40\\usr\\bin\\make.exe"
通过此Stacklink中的devtools
连接到路径:How to add Rtools\bin to the system path in R
我使用以下代码来安装下载的.tar.gz软件包:
install.packages("C:/Program Files/R/R-3.6.3/Liszt_0.8-5_1.tar.gz", repos=NULL,
type="source")
该软件包无法安装,相反,我收到以下错误:
* installing *source* package 'Liszt' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'Liszt'
finding HTML links ... done
A3ModelFun html
A5ModelFun html
Caterpillar html
LL html
Liszt-package html
extract html
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for 'rjags':
.onLoad failed in loadNamespace() for 'rjags', details:
call: fun(libname, pkgname)
error: Failed to locate any version of JAGS version 4
The rjags package is just an interface to the JAGS library
Make sure you have installed JAGS-4.x.y.exe (for any x >=0, y>=0) from
http://www.sourceforge.net/projects/mcmc-jags/files
Error : package 'rjags' could not be loaded
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/Sneve/Documents/R/win-library/3.6/Liszt'
Warning in install.packages :
installation of package ‘C:/PROGRA~1/R/R-36~1.3/Liszt_0.8-5_1.tar.gz’ had non-zero exit status
我尝试了一段时间,但没有成功。任何帮助深表感谢。
提供软件包的网站:http://www.possinghamlab.org/2016-05-30-04-33-10/list-length-analysis.html
软件包在这里可用:http://www.possinghamlab.org/images/LLA/Liszt_0.8-5_1.tar.gz
我安装了JAGS的64位版本。显然,该软件包需要同时安装在PC上的32位和64位版本。在我还安装了JAGS的32位版本之后,安装软件包没有问题。