首页 > 解决方案 > 通过 Github 下载 R 包

问题描述

我一直在尝试rethinking为 R 安装软件包。我已经下载了先决条件,包括rstan,但仍然收到相同的错误消息。我的代码如下:

library(devtools)
install_github("rmcelreath/rethinking")

我不断得到这个输出:

Downloading GitHub repo rmcelreath/rethinking@master
Skipping 1 packages ahead of CRAN: StanHeaders
√  checking for file 'C:\Users\noahj\AppData\Local\Temp\RtmpK0JHwE\remotes2a60431d781f\rmcelreath-rethinking-f393f30/DESCRIPTION' ...
-  preparing 'rethinking': (1.6s)
√  checking DESCRIPTION meta-information ... 
-  checking for LF line-endings in source and make files and shell scripts (725ms)
-  checking for empty or unneeded directories
-  looking to see if a 'data/datalist' file should be added
-  building 'rethinking_2.00.tar.gz' (699ms)

Installing package into ‘C:/Users/noahj/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'rethinking' ...
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error: (converted from warning) package 'rstan' was built under R version 3.6.3
Execution halted
ERROR: lazy loading failed for package 'rethinking'
* removing 'C:/Users/noahj/Documents/R/win-library/3.6/rethinking'
Error: Failed to install 'rethinking' from GitHub:
  (converted from warning) installation of package ‘C:/Users/noahj/AppData/Local/Temp/RtmpK0JHwE/file2a605bda3304/rethinking_2.00.tar.gz’ had non-zero exit status

感谢任何有任何见解和帮助的人!

标签: rgithubpackagedevtools

解决方案


推荐阅读