[英]Installing rethinking
我试图按照 McElreath 的说明安装 rethinking 到这封信。 安装 rstan 然后按照语法 (1) 安装,包括每次他建议时重新启动 R。 出现错误 (2),我不知道如何解决。 (1)
install.packages(c('coda','mvtnorm'))
options(repos=c(getOption('repos'),rethinking='http://xcelab.net/R'))
install.packages('rethinking',type='source')
(2)
ERROR: dependency 'shape' is not available for package 'rethinking'
* removing 'C:/Users/AACH4770/Documents/R/win-library/4.0/rethinking'
Warning in install.packages :
installation of package ‘rethinking’ had non-zero exit status
它还可以与您的 repos 分配略有不同同时工作。 它是一个命名向量,以下效果更好:
install.packages("rethinking",
repos=c(cran="https://cloud.r-project.org",
rethinking="http://xcelab.net/R"))
奇怪的是,它并没有成功。 shape
仍然丢失,但是在明确安装shape
并重新运行上面的命令后它可以工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.