The most popular R packages, according to RStudio
I’ve been thinking about doing some empirical R research lately. The nice thing about doing research related to R, is it’s a language people other than computer scientists actually use. In that vein, I decided to try to determine what R packages are the most popular. This isn’t as straightforward as it might seem. The main “official” package archive is CRAN, but there’s also Bioconductor, and probably some others I don’t know about. CRAN has multiple mirriros so there is no one place where the download statistics are kept. The largest compiled statistics I found were at cran-logs.rstudio.com.
RStudio is an IDE for R with many (thousands) of users and they publish their download logs online. The users of RStudio might not be a representative sample of the whole R user population, but that’s the data I have.
I wrote an R script to download the logs and make some nice plots.
First, I wrote two functions to download the logs. I didn’t want to re-download the logs each time, I’ve been working on my local library’s sketchy WiFi lately, so I take the set difference of what I have in my log directory and what RStudio has on its server.
Now that I’ve downloaded the files, I just open them and merge the tables.
On to the good part. I made two plots to visualize the most popular packages.
This is a legitimate use for a word cloud; I contend. DBI stands for “Database Interface.” Rcpp is a package for call C++ from R. It’s not surprising the the most popular packages are for the things people typically do in R, namely look at data and plot it. I’m a little surprised the Rcpp is very popular. I thought most R users just used premade packages. Maybe Rcpp is requried by packages they use and they’re not really writting their own.
Now for a more sensible plot, a bar plot.
For this plot I can see that sample size actually fairly large. From the begining of June to June 17th, the DBI package was downloaded over 50,000 times.
Tip ‘o the hat to this blog post for pointing me to the RStudio logs.