Twitter's Favorite Lesser Known Packages

At the 2018 December NYC R Ladies meetup (yes this post has been sitting in my drafts for over a year), a group started talking about how a few tiny functions in a lesser-known package can provide you with serious magic. The problem is finding those packages and functions! With so many amazing packages on CRAN and GitHub, how do you even begin to search? One way - ask all your twitter followers what they think, and twitter did not disappoint - so here are some examples of amazing packages and functions you might want to learn about.

The types of functions offered seemed to fall in a couple buckets. For example, making tasks you do all the time easier (cleaning data, summary), dealing with data structures that aren’t are easy to deal with (factors, strings.. etc), visualizations, and so much more.

Data Tasks

My favorite lesser known package is Janitor by Sam Firke. This package has basic functions to clean and prep messy data files. The functions are mostly relatively easy to replicate with dplyr, but why write the same thing over and over when Janitor does it for you!

Skimr, as suggested by Fernando Flores, started at an ROpenSci Un-conf that provides a better summary function. It creates both a tidy version of the summary table to work with and a visual version to inspect. This is super useful for investigating data issues.

Data Types

The tidyverse packages for dealing with specific data types are not nearly as widely used as they can be; forcats, lubridate, glue, and stringr can help solve so many problems with factor, dates, and strings.

Plotting Support

A few of the recommendations focused on vizulations and plotting. Key shouts outs for naniar and patchwork. Naniar helps you visualize your missing values. Patchwork allows you to combine plots together.

Other

There are were a ton of other amazing offerings for excellent packages.

The magrittr package has many useful operators outside of the normal %>% pipe.

If you work with spatial data at all, the sf package is a must.

What is your favorite lesser know package or function? Sound off in the comments (or find me on twitter).

Written on June 30, 2020