devtools :: install_github(“rstudio / rmarkdown”)上的insallation失败

问题描述 投票:0回答:2

我使用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

我该如何安装?

r r-markdown
2个回答
0
投票

这已经解决了。我用过devtools :: install_url(“http://cran.r-project.org/src/contrib/rmarkdown_1.9.tar.gz”)


0
投票

正如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")
© www.soinside.com 2019 - 2024. All rights reserved.