首页 > 解决方案 > R Studio 1.3.959 Errors in Installing Packages?

问题描述

As I try to install tidyverse on my newly installed R Studio, with Rtools already installed, it gives me such errors. I am confused as to how I should approach this. Perhaps I have missed something fundamental?

install.packages("tidyverse")

Installing package into ‘C:/Users/Asus/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tidyverse_1.3.0.zip'

Content type 'application/zip' length 439944 bytes (429 KB) downloaded 429 KB

package ‘tidyverse’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\Asus\AppData\Local\Temp\RtmpwvpGBU\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’</p>

devtools::install_github("")

Error: .onLoad failed in loadNamespace() for 'pkgload', details: call: loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) error: there is no package called ‘backports

EDIT: Phil is great, it worked

标签: r

解决方案


您可以按照评论中的建议手动安装这些依赖项。但是,我会尝试以下方法:

install.packages("tidyverse", dependencies=TRUE)

另请参阅以下链接以获取有关该dependencies参数的更多信息: https ://www.rdocumentation.org/packages/utils/versions/3.6.2/topics/install.packages


推荐阅读