类似于没有有效答案的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 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 rd02
我认为这与bashrc/bash_profile有关,但我在google上找不到任何对我有帮助的东西。
发布于 2016-02-26 17:46:42
在我看来,您已经在包管理器之外安装了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)
https://stackoverflow.com/questions/35646882
复制相似问题