7.5 Resources

This section provides some pointers to additional resources on tidy data.

7.5.1 Help on tidying data

Read Chapter 12: Tidy data in the r4ds textbook (Wickham & Grolemund, 2017).

For additional details on the tidyr package (Wickham & Girlich, 2024):

The Posit cheatsheet on data tidying with tidyr functions.

Figure 7.3: The Posit cheatsheet on data tidying with tidyr functions.

7.5.2 Miscellaneous

For background information on the notion of tidy data, see the following paper by Hadley Wickham (2014b):

For a critical view, see the following blog post:

The section Related work on https://tidyr.tidyverse.org provides some historical notes (e.g., on the relation between tidyr and reshape), pointers on terminology between different frameworks (e.g., SQL), and recommends the following papers:

A powerful alternative framework to data cleaning and wrangling is provided by the data.table package (Barrett et al., 2024).

Check out Wikipedia: Tidy data for additional details and links.

For animated images of common data transformations (e.g., by using spread() and gather()), see

7.5.3 Outlook

The commands of tidyr are first steps, rather than the ultimate solution to data wrangling. This area is currently under active development and only the future will show which framework will ultimately be adopted. And rather than despairing about technological changes, we all should feel happy — as in the Chinese proverb — to live in interesting times…


[07_tidy.Rmd updated on 2024-03-20 11:48:21.4965 by hn.]


Barrett, T., Dowle, M., Srinivasan, A., Gorecki, J., Chirico, M., & Hocking, T. (2024). Data.table: Extension of ‘data.frame‘. Retrieved from https://r-datatable.com
Wickham, H. (2014b). Tidy data. Journal of Statistical Software, 59(10), 1–23. https://doi.org/10.18637/jss.v059.i10
Wickham, H., & Girlich, M. (2024). tidyr: Tidy messy data. Retrieved from https://tidyr.tidyverse.org
Wickham, H., & Grolemund, G. (2017). R for data science: Import, tidy, transform, visualize, and model data. Retrieved from http://r4ds.had.co.nz