I recently discovered this method of visualizing past & future CRAN downloads by Péter Sólymos. The following is a highly simplied version showing only past CRAN downloads:
library(cranlogs)
daily.downloads<-function(pkg,from="2013-08-27",to="2016-08-26"){
obj<-cran_downloads(pkg,from=from,to=to)
attach(obj)
plot(count~date,type="l",col="grey",
ylim=c(0,quantile(count,0.99)),
ylab=paste("daily downloads (",pkg,")",sep=""))
lines(lowess(date,count),col="red",lwd=2)
title(main=pkg)
detach(obj)
invisible(obj)
}
Naturally (and my apologies for the narcissism involved here), I had to apply it to phytools:
daily.downloads("phytools")
Here are some other popular R phylogenetics packages:
daily.downloads("ape")
daily.downloads("phangorn")
daily.downloads("geiger")
and less-popular ones, like our Rphylip package:
daily.downloads("Rphylip")
Note that (and not with specific reference to Rphylip by any means) some excellent packages are not as often downloaded, simply because they perform highly specialized analyses or because they have dependency relationships with relatively few other packages.
BTW, here is a plot made with the package miniCRAN (itself using igraph) which summarizes the dependency packages of a given library (that is, the packages on which it depends or imports from, not the reverse):
library(miniCRAN)
obj<-makeDepGraph("phytools",enhances=TRUE)
plot(obj,legendPosition=c(-1,1),vertex.size=20,cex=0.6)
Hi Liam,
ReplyDeleteI would assume that Rphylip is less uploaded as it is also less frequently updated and people will have already the newest version.
Klaus
Good point. I guess I need to update phytools more frequently!
Delete