一登舞、代碼安裝:
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導(dǎo)入到gitee倉庫
remotes::install_git('https://gitee.com/你的用戶名/你的倉庫名')