【问题标题】:Rscript using incorrect R versionRscript 使用不正确的 R 版本
【发布时间】:2016-06-09 09:11:46
【问题描述】:

类似于this 没有有效答案的问题。

我正在尝试在 linux redhat 6.6 上使用 Rscript,但是 Rscript 使用了不正确的 R 版本。如何让 Rscript 使用最新的 R 版本?

运行Rscript --version 产生

R scripting front-end version 2.13.0 (2011-04-13)

而运行R 产生:

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R 和 Rscript 上的 Whereis 产生以下结果:

[]$ whereis R
R: /usr/local/bin/R
[]$ whereis Rscript
Rscript: /usr/local/bin/Rscript

产生以下结果:

[rd02@ipgrd02 ~]$ which Rscript
/usr/local/bin/Rscript
[rd02@ipgrd02 ~]$ which R
/usr/local/bin/R

rpm -qa |egrep ^R 产生以下结果: [rd02@ipgrd02 ~]$ rpm -qa | egrep ^R Red_Hat_Enterprise_Linux-Release_Notes-6-en-US-6-2.el6.noarch

我认为这与 bashrc/bash_profile 有关,但我在 google 上找不到任何对我有帮助的东西。

【问题讨论】:

  • 添加了更多信息
  • 我仍然需要答案

标签: r linux .bash-profile rscript


【解决方案1】:

在我看来,您已经在包管理器之外安装了 R。在 CentOS/RedHat 7.x 平台上,相同的安装如下所示:

#which Rscript
/bin/Rscript
#which R
/bin/R
#rpm -qa | egrep ^R
R-core-3.2.3-4.el7.x86_64
R-3.2.3-4.el7.x86_64
R-core-devel-3.2.3-4.el7.x86_64
R-devel-3.2.3-4.el7.x86_64
R-java-3.2.3-4.el7.x86_64
R-java-devel-3.2.3-4.el7.x86_64
#whereis R
R: /usr/bin/R /usr/lib64/R /usr/include/R /usr/share/R /usr/share/man/man1/R.1.gz
#whereis Rscript
Rscript: /usr/bin/Rscript /usr/share/man/man1/Rscript.1.gz

您介意澄清一下这些软件包是如何安装的吗?

我的系统上有以下内容:

#Rscript --version
R scripting front-end version 3.2.3 (2015-12-10)
#R

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

【讨论】:

  • 我已经添加了哪些信息,我刚开始在这台服务器上工作时不知道这些软件包是如何安装的
猜你喜欢
  • 2011-12-17
  • 2010-11-09
  • 2017-04-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-12-23
相关资源
最近更新 更多