Created
February 9, 2011 04:25
-
-
Save yihui/817877 to your computer and use it in GitHub Desktop.
check the version of R on CRAN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = readLines("http://cran.r-project.org/sources.html") | |
# the version number is in the next line of 'The latest release' | |
rls = x[grep("latest release", x) + 1L] | |
newver = gsub("(.*R-|\\.tar\\.gz.*)", "", rls) | |
oldver = paste(getRversion(), collapse = ".") | |
# new version available? | |
compareVersion(newver, oldver) == 1L |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment