簡體   English   中英

無法在 R 中安裝 tidyverse 包。錯誤沒有調用包

[英]Cannot install tidyverse package in R. Error there is no package called

我正在嘗試在 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’

此外,我嘗試在 base R 中安裝並收到相同的消息。 我已經轉到臨時文件夾並解壓縮包並將其移到庫文件夾中。 當我嘗試library(assertthat)它給我一個錯誤,提示沒有安裝有效的軟件包。

我之前在這台機器上成功安裝了tidyverse ,但是這次嘗試使用它時它告訴我它沒有安裝,所以我試圖重新安裝它。

我刪除了我的 .Rhistory、.Rdata 和 .Rprofile 文件,重新啟動了 R 並且能夠tidyverse地安裝tidyverse

我重新啟動了計算機並使用install.packages("devtools")安裝了 devtools。

之后,我確保將 Rtools 放在 PATH 上,只需按照此處的說明進行操作:在 Windows 上使用 Rtools40

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM