Skip to content

Tidying tools

Pivoting

Learn how use the new pivot_longer() and pivot_wider() functions which change the representation of a dataset without changing the data it contains.

Rectangling

Rectangling is the art and craft of taking a deeply nested list (often sourced from wild caught JSON or XML) and taming it into a tidy data set of rows and columns. This vignette introduces you to the main rectangling tools provided by tidyr: unnest_longer(), unnest_wider(), and hoist().

Nested data

A nested data frame contains a list-column of data frames. It’s an alternative way of representing grouped data, that works particularly well when you’re modelling.

Theory

Tidy data

A tidy dataset has variables in columns, observations in rows, and one value in each cell. This vignette introduces the theory of “tidy data” and shows you how it saves you time during data analysis.

Developer

Programming with tidyr

Notes on programming with tidy evaluation as it relates to tidyr.

In packages

Things to bear in mind when using tidyr in a package.