A search for popular R packages, that I would would otherwise miss.
Author
Mark Edney
Published
March 31, 2022
I sit here looking for inspiration, nothing interesting to write about. Perhaps there are some popular R packages on CRAN that I don’t know about? You can explore the data on downloads from CRAN with the cranlogs package.
Top CRAN downloads
With the following code, we can get the most popular packages from CRAN. The CRAN directory doesn’t represent all R packages, but a good amount of them.
From this list, we can see that the tidyverse represents a large amount of the top downloads with ggplot2, rlang and dplyr. The list includes the sf package for geospacial data, the glue package for string manipulation and the cli package which is used to create a command line interface for packages. Most of these packages I already have a good understanding of, so I need to narrow down the search.
Packages installed
You can get a list of your installed packages with the installed_packages function. You can then filter the top 100 list and remove anything you already have installed to find new packages.
From some quick research, I have found the following about the new packages:
ragg - a 2D library as an alternative to the RStudio default
rgl - functions for 3D interactive graphics
rgeos - a geometry package, but is currently planned to be retired at the end of 2023 for the sf package
zoo - a library to deal with time series
pkgdown - a library fOR building a blog website, I use blogdown
nloptr - a library for solving non-linear optimization problems
Hmisc - an assortment of different data analysis tools
lme4 - for fitting linear and generalized linear mixed-effects models
RcppEigen - integration of the eigen library in R for linear algebra
Take-away
Hopefully your take-way is a simple method to explore R library that you have never heard about. I know that a few of the libraries seem interesting and worth further exploring.
While we are at it, might as well find the daily values for the new packages and plot them for the last month.
new$package %>%cran_downloads(when ="last-month") %>%ggplot(aes(x = date, y = count, color = package)) +geom_line()