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 - Quantstart: Testing Strategy on Multiple Equit
- Using predict with svyglm
- Reshape matrix by rows
- Extract P-Values from Dunnett Test into a Table by
- split data frame into two by column value [duplica
相关文章
- How to convert summary output to a data frame?
- How to plot smoother curves in R
- Paste all possible diagonals of an n*n matrix or d
- ess-rdired: I get this error “no ESS process is as
- How to use doMC under Windows or alternative paral
- dyLimit for limited time in Dygraphs
- Saving state of Shiny app to be restored later
- How to insert pictures into each individual bar in
Run
R --version
there's info about version on the first line.Edit: 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.
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).Try
sessionInfo()
Next to the R version it also returns the versions of the loaded packages and more.
http://stat.ethz.ch/R-manual/R-patched/library/utils/html/sessionInfo.html
The builtin
version
will show this.version
is a named list with 14 items, really you just want to see:and in fact if you only want the version-string:
Type
builtins()
to see all the builtins.POSTSCRIPT: turns out
version
andR.version
(mentioned by nathaninmac) are aliases for the same thing.You can type 'which R' to which R binary gets used
or type R and see something like below, that should tell you which version.
" R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing .. .. "
In addition to @Piotr Jaszkowski,
R.Version()
should do the work as well