更新Rstudio后无法加载包

bejyjqdl  于 2023-01-03  发布在  其他
关注(0)|答案(1)|浏览(449)

我最近将Rstudio更新到了最新版本,但是现在当我尝试使用install.packages和library()时,不断收到错误消息。
下面是我看到的一个例子:

> install.packages("tidyverse", type="binary") ## Basic data manipulation
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
trying URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/tidyverse_1.3.2.zip'
Content type 'application/zip' length 428925 bytes (418 KB)
downloaded 418 KB

package ‘tidyverse’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\King Awesome\AppData\Local\Temp\RtmpaU0srW\downloaded_packages
> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespace ‘cli’ 3.3.0 is already loaded, but >= 3.4.0 is required
In addition: Warning message:
package ‘tidyverse’ was built under R version 4.2.2

我非常肯定这个问题与我当前的工作目录和库路径不匹配有关,但我不想在没有更有经验的R用户的建议的情况下开始进行重大更改,因为我担心会使情况更加复杂。
x一个一个一个一个x一个一个二个x

juzqafwq

juzqafwq1#

看起来解决方案是一个完整的擦除。我删除了所有安装的软件包,重新安装,现在又有功能了。很好的解决方案,@PavoDive

相关问题