R安装Github包

一、代码安装:

1.R安装devtools包或者remotes包,这两个包安装语句基本一样
install.packages("devtools")
install.packages("remotes")
2.安装github上的R包(需翻墙或改hosts)
devtools::install_github('lchiffon/REmap')
#q前为github的用户名,后为包名
3.测试
library(REmap)

二、本地安装

github.com上直接下载xx-master.zip,然后可以这样安装

remotes::install_local("D:/nCov2019-master.zip",upgrade = F,dependencies = T)

也可以将zip文件解压成文件夹XX-master,输入命令

install.packages("D:/nCov2019-master",repos=NULL,type="source")

* installing *source* package 'nCov2019' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'nCov2019'
    finding HTML links ... 好了
    get_nCov2019                            html  
    load_nCov2019                           html  
** 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 (nCov2019)

三、镜像安装

打不开Github,可以用镜像源安装,比如https://hub.fastgit.org/

devtools::install_git('https://hub.fastgit.org/lchiffon/REmap')

四、码云安装

申请一个码云gitee账号,然后直接从github导入到gitee仓库

remotes::install_git('https://gitee.com/你的用户名/你的仓库名')
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 慢慢的学会承受! 承受外部给你的一切! 凝聚成助你爆发的力量! 相信歇斯底里的忍让! 也相信歇斯底里的爆发! 刻意...
    HAIXIA吖阅读 334评论 0 0
  • 2018-11-14 今天我们就离开法国庄,我们昨晚住的地方。上午要去看圣埃美隆的一个酒庄,然后去参观圣埃美隆,这...
    陈岩ludovic阅读 488评论 0 6
  • 项目的版本管理中,每当一个release版本发布时,需要做一个记录,以便以后需要的时候重新打包这个版本,这时候就用...
    极简coder阅读 33,088评论 5 21