My R package poppr hit over 20,000 downloads on CRAN. I thought this would be a nice opportunity to briefly talk about what initiated the development. Before that, let’s look at the cumulative number of downloads:
CRAN you dig it?
Thanks to the fantastic cranlogs package, assessing the download history of a package is quite simple (with the caveat that these are logs from the rstudio mirror, so the value is almost always lower than the true value). Here, I’ve created a graph that shows the cumulative number of downloads over the years, marking the times major, minor, and patch versions became available on CRAN1.
You can see above that I submitted a lot of patch versions early on, and even had to submit some within a few days of each other, but as time went along, I got better at making sensible release schedules. The rate of downloads is obviously increasing over time. How does the number of average daily downloads increase per year?
You can see that while the mean is increasing, the variance also increases:
If someone told me five years ago that my dissertation2 would be centered around an R package I developed, I probably would not have believed them. I was just finishing my first term as a grad student and hadn’t even rotated into the Phytophthora lab. While I had SOME experience in R by way of my stats classes and had taught myself some rudimentary perl and BASH, I was no where near ready to write an R package. Asking me to write an R package was like asking me to build a car… blindfolded… with one arm tied behind my back… at a party.
You get the gist. When I started my rotation in the Phytophthora lab, my first task was to simulate populations of partially-clonal diploids and analyze the standardized index of association to see how it behaved under different population genetic scenarios3. I was able to get the simulations up and running in a couple of months after learning Python, but when it came time to analyze the data, the only program that could calculate the index of association was Multilocus. At the time it was only possible to get this from third-party download sites and it could only run on Windows and OSX platforms. Once you were able to download this and run it, you could only analyze one data set at a time and it was slow4. If I wanted to have any hope of completing this project, I had to find another way. My advisor suggested, “Why don’t you rewrite this analysis in R?” Without knowing any better, I tried it out and spent the next few weeks desperately trying to figure out how to implement the index of association in R.
Eventually, my script worked and then the suggestion came: “You should make an R package out of this.” Serendipitously, Hadley Wickham was teaching an R development masterclass in June of 2012. Before I knew it, I was signed up for the course. After that, I began working on making the package that would eventually become poppr, relying heavily on the code for adegenet for inspiration. I presented a poster for version 0.2 at the 27th Fungal Genetics Conference in March 2013.
While poppr is not the best name in the world, there were far worse suggestions.
After R had officially released version 3.0.0 and the packages poppr depended upon finally were working again, I submitted to CRAN, but I didn’t get there in one try. I got a relatively tame email from Brian Ripley about the vignette and some examples running too long. After that, we made our first submission to a journal.
The first two journals we submitted to rejected us right out (that is, three months after submission), so we revised a third draft and submitted it as a pre-print to PeerJ. After about a month, we got positive reviews with minor revisions, and the paper was published on March 4th, 2014. As of now, according to PeerJ, it has been cited over 100 times.
All in all, poppr came out of being in the right place at the right time when both R and software development were becoming more accessible. It is still in existence because I make sure that it’s use-able and reliable. Tools like devtools, roxygen2, testthat, travis-ci, and git have made the development process so much easier. This, in turn gives me more time to focus on how people will actually use the software, which is important because if software is difficult to use, fewer people will want to use it.
See http://yihui.name/en/2013/06/r-package-versioning/. Major == breaking changes | Minor == new functions | Patch == bug fixes/documentation improvements ↩
This project eventually became the fifth chapter in my dissertation https://zkamvar.github.io/dissertation/5-factors-influencing-inference-of-clonality-in-diploid-populations.html ↩