我的计算机上正在运行哪个版本的R? [英] Which version of R is running in my computer?
问题描述
我的计算机上有两个R目录:
一个是/home/R-2.15.2
,另一个是/home/R-2.15.1
,
当我输入R
时,我可以启动R,现在我想知道哪个R正在运行:2.15.1或2.15.2?
There are two R directories on my computer:
one is /home/R-2.15.2
,the other is /home/R-2.15.1
,
when I input R
, I can start R, now I want to know which R is running: 2.15.1 or 2.15.2?
推荐答案
运行R --version
第一行中包含有关版本的信息.
Run R --version
there's info about version on the first line.
如果您问这个问题,那么我敢打赌R不在任何这些目录中运行.检查$ PATH env变量以获取查找二进制文件的位置和顺序的信息.
If you ask this question then I bet that R is not running from any of these directories. Check $PATH env variable to get information where binaries are looked for and in which order.
使用type
shell命令来查找给定命令的二进制存储位置,所有路径的-a
,散列路径的-f
(基本上:最近使用).
Edit 2: Use type
shell command to find where binary for given command is stored, -a
for all paths, -f
for the hashed one (basically: most recently used).
这篇关于我的计算机上正在运行哪个版本的R?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!