首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在R.中安装tidyverse包错误没有一个包名为

无法在R.中安装tidyverse包错误没有一个包名为
EN

Stack Overflow用户
提问于 2019-03-24 00:39:24
回答 2查看 13.1K关注 0票数 4

我试图在install中安装软件包tidy verse并接收这些错误。

代码语言:javascript
复制
> 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,但是当这次尝试使用它时,它告诉我它没有安装,所以我尝试重新安装它。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2019-03-24 20:56:11

我删除了我的.Rhistory、.Rdata和.Rprofile文件,重新启动了R,并且能够毫无问题地安装tidyverse

票数 3
EN

Stack Overflow用户

发布于 2021-04-30 07:16:52

我重新启动了计算机,并使用install.packages("devtools")安装了devtools。

之后,我确保将Rtools放在路径上,只需遵循这里的说明:在Windows上使用Rtools40

之后,我能够使用install.packages("tidyverse")安装tidyverse。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55319716

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档