使用不正确的R版本的Rscript
类似于没有有效答案的问题 我试图在linux redhat 6.6上使用Rscript,但是Rscript使用的R版本不正确。如何让Rscript使用最新的R版本 运行Rscript--version产生使用不正确的R版本的Rscript,r,linux,.bash-profile,rscript,R,Linux,.bash Profile,Rscript,类似于没有有效答案的问题 我试图在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 Founda
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
其结果如下:
[]$ 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_配置文件有关,但我在谷歌上找不到任何有助于我的信息。在我看来,您在软件包管理器之外安装了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)
添加了其他信息我仍然需要回答我添加了哪些信息,我不知道这些软件包是如何安装的,因为我刚刚开始在这个服务器上工作