Get the latest stable R version number programmatically
3 answers
Another potential alternative: CRAN has a version information dcf file. I'm not sure how reliably it updates.
R> tmp <- tempfile()
R> download.file("http://cran.r-project.org/src/base/VERSION-INFO.dcf", tmp)
R> (x <- read.dcf(tmp))
Release Old-release Devel
[1,] "3.2.0" "3.1.3" "3.3.0"
+4
source to share
There is a new isa rversions package from Gabor that makes maintenance even easier:
R> library(rversions)
R> r_release()
version date
94 3.2.0 2015-04-16T07:13:33.144514Z
R>
R> r_release()[[1]]
[1] "3.2.0"
R>
If you have devtools installed , you probably already have rversions .
There are two more functions in the package to get
- previous release through
r_oldrel()
as well - vector of all issues through
r_versions()
+3
source to share