我试着按照McElreath关于安装重新思考的说明进行说明。安装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发布于 2020-08-08 14:15:26
它还与您的repos分配略有不同的同时工作。作为一个命名向量,以下内容工作得更好:
install.packages("rethinking",
repos=c(cran="https://cloud.r-project.org",
rethinking="http://xcelab.net/R"))奇怪的是,它并不能完全做到这一点。shape仍然缺少,但是在显式安装shape并重新运行上面的命令之后,它就能工作了。
https://stackoverflow.com/questions/63297914
复制相似问题