B Package guide
This guide offers capsule descriptions of the best R packages for doing certain kinds of computational historical work. CRAN provides task views that list all of the packages available for a particular purpose, such as machine learning or time series analysis. You may also find those helpful if you are looking for a certain kind of package.
B.1 The tidyverse
The tidyverse package is an easy way of installing and accessing a set of packages that subscribe to a “tidy data” philosophy and that work together well. It is important to understand, though, what its constituent packages do. dplyr lets you manipulate tabular data, whether in memory or via a database connection. tidyr provides additional functions that let you reshape data to get it into a tidy format. Those two packages work with an updated class of data frame provided by the tibble package. ggplot2 is offers a grammar of graphics approach to data visualization. stringr provides fast and consistent functions for dealing with string data. purrr adds functional programming facilities to R. forcats lets you deal easily with factors, R’s data type for categorical data. broom takes many different kinds of R objects and turns them into tidy data frames. magrittr provide the pipe function (
%>%) much used by other R packages and in this book.