0


Github下载zip格式R包本地安装

devtools::install_github("x")
Error: Failed to install 'unknown package' from GitHub:
  OpenSSL SSL_connect: Connection reset by peer in connection to api.github.com:443

因为网络的原因无法从GitHub直接安装R包

或者诸如OpenSSL SSL_connect: Connection reset by peer in connection to api.github.com:

这类报错应该都是因为网络问题。

适合有些R包再CRAN里面也找不到,所以也下载不到tar.gz的格式的情况

尝试下载zip本地安装

先把zip文件下载到本地

但是浏览器这么下载会带一个 _main 最好把文件夹名压缩包名字这个 _main都改掉

然后在R里面给出压缩包的路径就可以安装了

library(devtools)
devtools::install_local("/root/pub/case1/XXX.zip")
  • installing source package ‘xxx’ ...

** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path

  • DONE (xxx)

或者没有安装devtools的情况就直接

install.packages("/path/package.zip",repos=NULL)

应该也是可以的

标签: github

本文转载自: https://blog.csdn.net/xiaozheng1213/article/details/128213984
版权归原作者 Bioinfoer 所有, 如有侵权,请联系我们删除。

“Github下载zip格式R包本地安装”的评论:

还没有评论