无法在 R 中安装 tidyverse 包。错误,没有名为的包

CT *_*all 6 installation r tidyverse

我尝试tidy verse在 R studio 中安装该包并收到这些错误。

\n\n
> install.packages('tidyverse')\nalso installing the dependency \xe2\x80\x98rstudioapi\xe2\x80\x99\n\n  There is a binary version available but the source version is later:\n           binary source needs_compilation\nrstudioapi  0.9.0   0.10             FALSE\n\ntrying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/tidyverse_1.2.1.tgz'\nContent type 'application/x-gzip' length 88754 bytes (86 KB)\n==================================================\ndownloaded 86 KB\n\n\nThe downloaded binary packages are in\n    /var/folders/kn/b21xc36111z157czpz0swc900000gn/T//RtmpeVGvVh/downloaded_packages\ninstalling the source package \xe2\x80\x98rstudioapi\xe2\x80\x99\n\ntrying URL 'https://cran.rstudio.com/src/contrib/rstudioapi_0.10.tar.gz'\nContent type 'application/x-gzip' length 61888 bytes (60 KB)\n==================================================\ndownloaded 60 KB\n\nError in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : \n  there is no package called \xe2\x80\x98assertthat\xe2\x80\x99\nCalls: time.to ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>\nExecution halted\nWarning in install.packages :\n  installation of package \xe2\x80\x98rstudioapi\xe2\x80\x99 had non-zero exit status\n\nThe downloaded source packages are in\n    \xe2\x80\x98/private/var/folders/kn/b21xc36111z157czpz0swc900000gn/T/RtmpeVGvVh/downloaded_packages\xe2\x80\x99\n
Run Code Online (Sandbox Code Playgroud)\n\n

此外,我尝试在基本 R 中安装并收到相同的消息。我已转到临时文件夹并解压缩包并将其移至库文件夹。当我尝试时library(assertthat),它给我一个错误,提示没有安装有效的软件包。

\n\n

tidyverse之前已经在这台机器上成功安装过,但是这次尝试使用它时它告诉我它没有安装,所以我尝试重新安装它。

\n

CT *_*all 7

我删除了 .Rhistory、.Rdata 和 .Rprofile 文件,重新启动 R 并且能够顺利安装tidyverse

  • 我不敢相信事情就这么简单。我挣扎了30分钟,但随后就遵循了这个&amp;砰。已排序 (3认同)