我使用R 3.4.3,我需要安装devtools :: install_github(“rstudio / rmarkdown”)。但是出现以下安装错误。
Downloading GitHub repo rstudio/rmarkdown@master
from URL https://api.github.com/repos/rstudio/rmarkdown/zipball/master
Installation failed: zip file 'C:\Users\Buster\AppData\Local\Temp\RtmpWyl4FP\file3bc6c571eec.zip' cannot be opened
Warning messages:
1: GitHub repo contains submodules, may not function as expected!
2: In utils::unzip(src, exdir = target) :
error 1 in extracting from zip file
我该如何安装?
这已经解决了。我用过devtools :: install_url(“http://cran.r-project.org/src/contrib/rmarkdown_1.9.tar.gz”)
正如README对rmarkdown的解释:
如果您在RStudio中工作,那么您只需安装当前版本的RStudio(包括rmarkdown软件包和pandoc)。
如果要在RStudio外部使用rmarkdown软件包,则可以按如下方式从CRAN安装软件包:
install.packages("rmarkdown")
这是一种更简洁的做法:
devtools::install_url("http://cran.r-project.org/src/contrib/rmarkdown_1.9.tar.gz")