Re: [Rd] version comparison puzzle

2013-10-03 Thread Jari Oksanen
half of Martyn Plummer [plumm...@iarc.fr] Sent: 03 October 2013 11:15 To: Ben Bolker Cc: r-de...@stat.math.ethz.ch Subject: Re: [Rd] version comparison puzzle It's an underflow problem. When comparing versions, "a.b.c" is converted first to the integer vector c(a,b,c) and then to the

Re: [Rd] version comparison puzzle

2013-10-03 Thread Martyn Plummer
It's an underflow problem. When comparing versions, "a.b.c" is converted first to the integer vector c(a,b,c) and then to the double precision value a + b/base + c/base^2 where base is 1 greater than the largest integer component of any of the versions: i.e 99912 in this case. The last term

[Rd] version comparison puzzle

2013-10-02 Thread Ben Bolker
Can anyone explain what I'm missing here? max(pp1 <- package_version(c("0.9911.3","1.0.4","1.0.5"))) ## [1] ‘1.0.4’ max(pp2 <- package_version(c("1.0.3","1.0.4","1.0.5"))) ## [1] ‘1.0.5’ I've looked at ?package_version , to no avail. Since max() goes to .Primitive("max") I'm having tr