liveBook · Manning

Tidyr

As explained in Statistics Slam Dunk

tidyr is an R package for reshaping and tidying tabular data.

tidyr is an R package for reshaping and tidying tabular data. It works alongside dplyr within the tidyverse to transform datasets, subset rows or columns, summarize groups, create variables, and join datasets. section 1.3

Use tidyr when preparing data for exploratory analysis or later statistical work:

  • Reshape datasets into forms suitable for analysis. section 1.3
  • Combine tidyr and dplyr functions for broader data-wrangling workflows. section 6.1
  • Inspect cleaned data with summaries, correlation plots, histograms, and other visualizations before testing or modeling. section 1.3
library(tidyverse)
library(sqldf)
library(patchwork)

A typical setup loads tidyverse, which provides tidyr and dplyr alongside tools for querying and visualization. section 6.1

How Statistics Slam Dunk covers it

How deep it goes
Lists core wrangling roles but does not detail individual tidyr functions or their implementation.
Examples
Uses tidyverse package loading within workflows involving CSV imports, data reshaping, summaries, joins, and visual exploration.
What you can do after
Apply it via tidyr functions to reshape and prepare datasets for exploration, visualization, and further analysis.
How it connects
Connects tidyr with dplyr, tidyverse, readr, ggplot2, and exploratory data analysis.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.