The built-in version will show this.
> version _ platform x86_64-apple-darwin9.8.0 ... version.string R version 2.15.2 (2012-10-26)
version is a named list of 14 elements, in fact you just want to see:
> version[['version.string']] _ [1] "R version 2.15.2 (2012-10-26)"
and in fact, if you want only the version string :
> strsplit(version[['version.string']], ' ')[[1]][3] [1] "2.15.2"
Enter builtins() to see all the built-in functions.
POSTSCRIPT: It turns out that version and R.version (mentioned by nathaninmac ) are aliases for the same thing.
source share