The tidyverse is a collection of R packages for importing, transforming, reshaping, summarizing, and visualizing data. It supports an end-to-end workflow: read data with readr, wrangle it with dplyr and tidyr, explore it with statistics and graphics, then analyze or model the results. section 1.3 section 2.1
For practical data projects, the tidyverse connects several common tasks:
- Import rectangular data from delimited files, especially CSV files, with readr. section 2.1
- Transform, subset, summarize, create variables, and join datasets with dplyr. section 1.3
- Reshape datasets between wide and long formats with tidyr, preparing them for analysis or visualization. section 1.3 section 2.1
- Create polished exploratory charts with ggplot2, including correlation plots, histograms, and other visual content. section 1.3 section 2.1
Load the toolkit before exploring data
Install the collection once, then load it whenever the script needs its functions: install.packages("tidyverse") library(tidyverse) After loading it, import CSV data with read_csv(), wrangle it with dplyr or tidyr, and visualize it with ggplot2. Packages can also be loaded incrementally, but loading the planned toolkit up front makes the workflow explicit. section 1.3 section 2.1
Figure 1.5 A typical chapter flow and, not coincidentally, the typical end-to-end flow of most real-world data science and statistics projects
Use the workflow diagram to connect package loading, data preparation, exploratory analysis, and later statistical analysis into one project sequence. section 1.3
