简体   繁体   English

尝试加载 tidyverse 但我遇到“> library(tidyverse) 库中的错误 (tidyverse):没有 package 称为 'tidyverse'”

[英]tried to load tidyverse but I'm met with “> library(tidyverse) Error in library(tidyverse) : there is no package called ‘tidyverse’”

I ran the install.packages("tidyverse") and the installation was done.我运行了install.packages("tidyverse")并完成了安装。

At the end the following errors and warnings appeared:最后出现以下错误和警告:

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'

Most likely it is because you很可能是因为你
a) forgot to install.packages('tidyverse') a) 忘记安装install.packages('tidyverse')
or或者
b) the 'install.packages('tidyverse')' failed b) 'install.packages('tidyverse')' 失败

you may prefer the {pacman} approach你可能更喜欢 {pacman} 方法
where p_load() checks whether installed,其中p_load()检查是否已安装,
then installs/loads or然后安装/加载或
just loads as needed按需加载

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM