gpt4 book ai didi

r - 无法在 R 中安装插入符包

转载 作者:行者123 更新时间:2023-12-04 01:22:30 24 4
gpt4 key购买 nike

我尝试了多种方法在 R 中安装 caret 包。我收到的错误信息如下:

Error: package or namespace load failed for ‘caret’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘dimRed’

当我尝试安装 dimRed 时,我收到以下消息:

Installing package into ‘C:/Users/Thomas/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘Biobase’ is not available

There is a binary version available but the source version is later:
binary source needs_compilation
dimRed 0.1.0 0.2.1 FALSE

installing the source package ‘dimRed’

trying URL 'https://cran.rstudio.com/src/contrib/dimRed_0.2.1.tar.gz'
Content type 'application/x-gzip' length 363025 bytes (354 KB)
downloaded 354 KB

ERROR: dependency 'Biobase' is not available for package 'dimRed' * removing 'C:/Users/Thomas/Documents/R/win-library/3.4/dimRed' In R CMD INSTALL Warning in install.packages : running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\Users\Thomas\Documents\R\win-library\3.4" C:\Users\Thomas\AppData\Local\Temp\RtmpqKhsKn/downloaded_packages/dimRed_0.2.1.tar.gz' had status 1 Warning in install.packages : installation of package ‘dimRed’ had non-zero exit status

The downloaded source packages are in ‘C:\Users\Thomas\AppData\Local\Temp\RtmpqKhsKn\downloaded_packages’

根据之前的帖子,我更新了 RStudio。我尝试从 install_url 安装。

欢迎提出任何建议。

最佳答案

我能够弄清楚这一点。简单地输入 install.packages 是行不通的。为了安装 Biobase,您必须在 R 控制台中运行以下代码:

if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("Biobase", version = "3.8")

更多信息:https://bioconductor.org/packages/release/bioc/html/Biobase.html

完成此步骤后,我再次使用插入符号

install.packages("caret",dependencies = T)

然后成功了。

关于r - 无法在 R 中安装插入符包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53272166/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com