我试图在install中安装软件包tidy verse并接收这些错误。
> install.packages('tidyverse')
also installing the dependency ‘rstudioapi’
There is a binary version available but the source version is later:
binary source needs_compilation
rstudioapi 0.9.0 0.10 FALSE
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/tidyverse_1.2.1.tgz'
Content type 'application/x-gzip' length 88754 bytes (86 KB)
==================================================
downloaded 86 KB
The downloaded binary packages are in
/var/folders/kn/b21xc36111z157czpz0swc900000gn/T//RtmpeVGvVh/downloaded_packages
installing the source package ‘rstudioapi’
trying URL 'https://cran.rstudio.com/src/contrib/rstudioapi_0.10.tar.gz'
Content type 'application/x-gzip' length 61888 bytes (60 KB)
==================================================
downloaded 60 KB
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘assertthat’
Calls: time.to ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
Warning in install.packages :
installation of package ‘rstudioapi’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/kn/b21xc36111z157czpz0swc900000gn/T/RtmpeVGvVh/downloaded_packages’此外,我还尝试在基本R中安装并接收相同的消息。我已经进入临时文件夹并解压缩包并将其移到库文件夹中。当我尝试library(assertthat)时,它会给我一个错误,即没有安装有效的包。
我以前已经在这台机器上成功地安装了tidyverse,但是当这次尝试使用它时,它告诉我它没有安装,所以我尝试重新安装它。
发布于 2019-03-24 20:56:11
我删除了我的.Rhistory、.Rdata和.Rprofile文件,重新启动了R,并且能够毫无问题地安装tidyverse。
发布于 2021-04-30 07:16:52
我重新启动了计算机,并使用install.packages("devtools")安装了devtools。
之后,我确保将Rtools放在路径上,只需遵循这里的说明:在Windows上使用Rtools40
之后,我能够使用install.packages("tidyverse")安装tidyverse。
https://stackoverflow.com/questions/55319716
复制相似问题