首页 > 解决方案 > 试图加载 tidyverse 但我遇到了 "> library(tidyverse) 库中的错误(tidyverse):没有名为 'tidyverse' 的包"

问题描述

我跑了install.packages("tidyverse"),安装完成了。

最后出现以下错误和警告:

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 61440 != reported length 104968
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 'rprojroot/DESCRIPTION', probable reason 'No such file or directory'

标签: rtidyverse

解决方案


很可能是因为您
a) 忘记了install.packages('tidyverse')

b) 'install.packages('tidyverse')' 失败

您可能更喜欢 {pacman} 方法
,该方法p_load()检查是否已安装,
然后安装/加载或
仅根据需要加载


推荐阅读