我正在尝试在R Studio中安装包
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
,但这次尝试使用它时,它告诉我未安装,所以我尝试重新安装它。
assertthat
包未安装,因此您需要先安装它。 - dipetkovinstall.packages('assertthat')
,然后运行library(assertthat)
。如果一切顺利,请重新启动并尝试安装tidyverse。 - Tyler Rinker