From pdalgd at gmail.com  Fri Nov  7 12:09:48 2014
From: pdalgd at gmail.com (peter dalgaard)
Date: Fri, 7 Nov 2014 12:09:48 +0100
Subject: [Rd] r-release, r-oldrel
In-Reply-To: <545BFA1A.2060008@statistik.tu-dortmund.de>
References: <CABtg=Kn2fDXQedu=KaXpEx21hSLu=HqDB=aE_QthPvs8LCSzuw@mail.gmail.com>	<545BF7F3.4000708@statistik.tu-dortmund.de>
	<CABtg=Knonx3oAc+Xo0LN5Y4PYoSUKU-NRaKEusg6rMU1KO406Q@mail.gmail.com>
	<545BFA1A.2060008@statistik.tu-dortmund.de>
Message-ID: <C6E7D4D9-4049-404F-846C-C50961DE0E1A@gmail.com>


On 06 Nov 2014, at 23:45 , Uwe Ligges <ligges at statistik.tu-dortmund.de> wrote:

> 
> 
> On 06.11.2014 23:41, G?bor Cs?rdi wrote:
>> On Thu, Nov 6, 2014 at 5:36 PM, Uwe Ligges
>> <ligges at statistik.tu-dortmund.de> wrote:
>> [...]
>>>> quick question. How does one know which R versions r-release
>>> 
>>> 
>>> The latest official release, i.e. currently R-3.1.2.
>> 
>> Thanks!
>> 
>> How does one know what is the latest official release? Is parsing the
>> R homepage the best way to determine it?
> 
> I'd say yes.
> 
>> Or the latest tarball? Or can
>> I use the latest R-x-y-z tag from the SVN repository?
> 
> I assume that works.

Also,

/pub/R/src/base on CRAN contains:

lrwxrwxrwx    1 1007     1001           18 Oct 31 09:11 R-latest.tar.gz -> R-3/R-3.1.2.tar.gz

which is auto-updated on release.

r-oldrel is trickier. I suppose that you are right: the most effective way is to parse the output of 

svn ls -v http://svn.r-project.org/R/tags

Now you got me curious... this seems to do the job of finding the last release of all major.minor series:

tb <- read.table(text=system("svn ls -v http://svn.r-project.org/R/tags", intern=TRUE))
names(tb) <- c("rev","au","m","d","y.or.time", "tag")
ix <- grep(x=tb$tag,pattern="^R-[0-9]+-[0-9]")
tb <- tb[ix,c("rev", "tag")]
v.str <- as.character(tb$tag)[order(tb$rev)]
versions <- data.frame(do.call(rbind,strsplit(v.str,"[-/]+"))[,-1],stringsAsFactors=FALSE)
names(versions) <- c("major","minor","patch")
maj.min <- paste(versions$major,versions$minor, sep=".")
maj.min <- factor(maj.min,levels=unique(maj.min))
unsplit(lapply(split(versions, maj.min),tail,1),unique(maj.min))

-pd


> 
>> 
>>>> and r-oldrel
>>> 
>>> 
>>> If R-x.y.z is recent, then r-oldrel corresponds to the latest "y-1" version,
>>> i.e. currently R-3.0.3.
>> 
>> So this also means that when (say) R-3.0.2 was r-release, 2.15.3 was r-oldrel?
> 
> Right.
> 
> Best,
> Uwe
> 
>> Thanks again,
>> Gabor
>> 
>>> Best,
>>> Uwe Ligges
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



[Rd] r-release, r-oldrel
peter dalgaard