在已经完成的工作的基础上:
h <- getRdates()
# Find version release rate
library(plyr)
h <- subset(h,select=c(-Description))
Version <- sub("^R-([0-9a-z.-]+)\\.t.*","\\1",h$Name)
h$bigVersion <- as.numeric(sub("^([0-9])\\..+","\\1",Version))
h$smallVersion <- as.numeric(sub("^[0-9]\\.([0-9]+).+","\\1",Version))
h$majorVersion <- as.numeric(paste(h$bigVersion,sprintf( "%02.0f", h$smallVersion ),sep="."))
h <- ddply( h, .(bigVersion,majorVersion), function(x) {
x$tinyVersion <- seq(nrow(x))
x
})
# Plot
plot( majorVersion~Date, data=h, pch=".",cex=3)
abline(h=seq(1,2),col="red")
library(lattice)
print(xyplot( smallVersion~Date|bigVersion, data=h, pch=".",cex=3))
并一起比较:
h <- ddply( h, .(bigVersion), function(x) {
x$bigElapsedTime <- x$Date - min(x$Date)
x
})
png("c:/temp/Rplot3.png")
plot( smallVersion~bigElapsedTime, data=h, pch=".",cex=3,col=h$bigVersion+1)
dev.off()
# How many minor releases per major release
> table(rle(h$majorVersion)$lengths, substring(rle(h$majorVersion)$values,1,1))
0 1 2
1 1 0 0
2 5 5 9
3 1 1 6
4 2 4 1
5 1 0 0