r - 全新安装后加载 tidyverse 时出错 - R (loadNamespace, broom, backports)
问题描述
我刚刚将 R 更新到 4.0.2 版,并将 RStudio Desktop 更新到 1.3.959 版。从下面的代码中可以看出,在似乎成功安装之后,我无法加载 tidyverse 。但是, data.table 安装和加载非常好。这个事情谁有经验?谢谢!
来自控制台的代码(tidyverse 错误):
> install.packages('tidyverse')
Installing package into ‘C:/Users/iangm/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
also installing the dependencies ‘RColorBrewer’, ‘scales’, ‘dplyr’, ‘ggplot2’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/RColorBrewer_1.1-2.zip'
Content type 'application/zip' length 55583 bytes (54 KB)
downloaded 54 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/scales_1.1.1.zip'
Content type 'application/zip' length 560984 bytes (547 KB)
downloaded 547 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/dplyr_1.0.0.zip'
Content type 'application/zip' length 1302777 bytes (1.2 MB)
downloaded 1.2 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/ggplot2_3.3.2.zip'
Content type 'application/zip' length 4068169 bytes (3.9 MB)
downloaded 3.9 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tidyverse_1.3.0.zip'
Content type 'application/zip' length 440050 bytes (429 KB)
downloaded 429 KB
package ‘RColorBrewer’ successfully unpacked and MD5 sums checked
package ‘scales’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘ggplot2’ successfully unpacked and MD5 sums checked
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\iangm\AppData\Local\Temp\RtmpkNazQW\downloaded_packages
> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
.onLoad failed in loadNamespace() for 'broom', details:
call: loadNamespace(name)
error: there is no package called ‘backports’
来自控制台的代码(data.table 成功):
> install.packages('data.table')
Installing package into ‘C:/Users/iangm/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/data.table_1.12.8.zip'
Content type 'application/zip' length 2325868 bytes (2.2 MB)
downloaded 2.2 MB
package ‘data.table’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\iangm\AppData\Local\Temp\RtmpkNazQW\downloaded_packages
> library(data.table)
data.table 1.12.8 using 2 threads (see ?getDTthreads). Latest news: r-datatable.com
解决方案
包可能存在一些问题backports
:尝试重新安装该包并再次加载 tidyverse:
install.packages("backports")
library(tidyverse)
如果这不起作用,那么在 R 的早期主要版本(即 3.x)下构建的软件包可能存在问题。尝试使用以下命令重新安装所有软件包:
update.packages(ask = FALSE, checkBuilt = TRUE)
在此处查看更多信息:
推荐阅读
- postgresql - 使用 JDBC 从 PostgreSQL 获取存储过程的主体
- javascript - 汉堡菜单滑动
- excel - 即使使用 IsError,Excel VBA Vlookup 也会返回错误 2042
- vue.js - Adam Lynch 的带有 CSS 网格的灵活数据表的问题
- sql-server - 当日期文本框为空时,使用多个输入和两个日期之间的搜索不起作用
- oracle - 如何在 TEXT_IO 过程中自动调整 CSV 文件的宽度列
- c++ - MP4文件的帧/像素数据偏移?
- docker - 将 docker run 转换为 docker compose
- azure - 有没有办法将数据直接加载到 json 或 csv 格式到 cosmos db gremlin api?
- amazon-web-services - 无法在 kubernetes 中将前端应用程序 {Angular} 连接到后端 {SpringBoot}