我最近升级到R 3.5.0(Windows 10)。在此之后我无法安装dplyr。我得到的错误信息是:
Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
cannot open the connection
In addition: Warning messages:
1: In download.file(url, destfile, method, mode = "wb", ...) :
downloaded length 17723392 != reported length 17880019
2: In unzip(zipname, exdir = dest) :
error 1 in extracting from zip file
3: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")):
cannot open compressed file 'BH/DESCRIPTION', probable reason 'No such file or directory'
我已经能够安装其他软件包并且更换镜像没有帮助。我见过其他人报告此错误但不是一致的修复。
答案 0 :(得分:1)
尝试
install.packages('tidyverse')
然后
library(tidyverse)
Tidyverse是一个包含dplyr的软件包,它的安装问题通常较少。 它还包含ggplot2,因此一旦调用tydyverse
,您可能不需要再加载它答案 1 :(得分:0)
您是否尝试过设置依赖项= TRUE,就像 install.packages(“foo”,dependencies = TRUE)
有几次这有助于我安装软件包,否则就无法安装。