gpt4 book ai didi

r - 安装 gdata 失败(在 64 位 Linux 上)

转载 作者:行者123 更新时间:2023-12-04 10:12:51 25 4
gpt4 key购买 nike

我正在研究一个使用 gplots 库的 R 脚本。因此在脚本的某个时刻

library(gplots)

被调用。使用 32 位 linux 机器(Linux 3.2.0-33-generic-pae 52-Ubuntu SMP i686 GNU/Linux,Ubuntu 12.04)效果很好。
但是,我尝试在 64 位机器(Linux sim 2.6.38-15-server 66-Ubuntu SMP x86_64 GNU/Linux;Ubuntu 11.04)上运行脚本,现在它抛出错误:

Error in library(gplots) : there is no package called 'gplots'
Calls: generateHeatmap -> library
Execution halted

所以当我尝试安装 gplots 时,它引发了另一个错误:

> install.packages('gplots', type="source", dependencies=T)
ERROR: dependency ‘gdata’ is not available for package ‘gplots’
* removing ‘/home/schaller/R/x86_64-pc-linux-gnu-library/2.12/gplots’
...

因此,我正在尝试安装 gdata:

>install.packages('gdata', type="source", dependencies=F)
Installing package(s) into ‘/home/schaller/R/x86_64-pc-linux-gnu-library/2.12’
(as ‘lib’ is unspecified)
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘gdata’ is not available

我在网上搜索了可能的解决方案。我找不到任何。但是,我读到 gdata 在 64 位模式下的当前 R 版本上已损坏。有人发布了一个补丁 repo 协议(protocol) [1],但我无法使用这个 repo 协议(protocol)来安装 gdata。那么这意味着目前不可能在 64 位机器上使用这个包?

[1] - https://stat.ethz.ch/pipermail/r-help/2010-April/236966.html

更多信息:R 版本 2.12.1


回答:将 r-base 更新到当前版本解决了这个问题。

最佳答案

你应该可以做到

$ sudo apt-get install r-cran-gplots

之后 gdatagplots 从 Ubuntu 存储库安装。

当然,您也可以使用您喜欢的任何包管理前端。

关于r - 安装 gdata 失败(在 64 位 Linux 上),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13473741/

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