Tidy Messy Data
Overview
Tools to help to create tidy data, where each column is a variable, each row is an observation, and each cell contains a single value. 'tidyr' contains tools for changing the shape (pivoting) and hierarchy (nesting and 'unnesting') of a dataset, turning deeply nested lists into rectangular data frames ('rectangling'), and extracting values out of string columns. It also includes tools for working with missing values (both implicit and explicit).
fill()gains a.byargument as an alternative todplyr::group_by()for applying the fill per group, similar tonest(.by =)anddplyr::mutate(.by =)(@olivroy, #1439).expand_grid()gains a new.varyargument, allowing users to control whether the first column varies fastest or slowest (#1543, @JamesHWade).unnest_longer()now placesindices_tocolumns before value columns (#1486, @andrewshibata).unchop()produces a more helpful error message when columns cannot be cast toptype(@mgirlich, #1477).unite()no longer errors if you provide a selection that doesn't select any columns. Instead, it returns a column containing the empty string (#1548, @catalamarti).pivot_wider_spec()now throws a more informative error on non-data frame inputs (@catalamarti, #1510).
Show all changes in 1.3.2Hide the rest of the changes in 1.3.2
- Fixed an internal error in
pivot_wider()(#1609, @krlmlr). - R >=4.1.0 is now required, in line with the tidyverse standard of supporting the previous 5 minor releases of R (#1613).
- The base pipe is now used throughout the documentation (#1613).
- tidyr now requires dplyr >=1.1.0 (#1568, @catalamarti).
- tidyr is now compliant with R's C API (#1618).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- NOTE12 OK, 1 NOTE2026-06-08
- OK14 OK2026-03-30
Show 1 earlier changeHide 1 earlier change
- NOTE13 OK, 1 NOTE2026-03-10
Documentation
- Help pages
- 49 (12 internal)includes a package overview page
- Examples that run
- 100%31 run in a plain check
- Exported functions with examples
- 86%
- Documented parameters
- 90%
- Return-value docs
- 12%
- Help pages citing references
- 0%
- In packages HTML
- Nested data HTML
- Pivoting HTML
- Programming with tidyr HTML
- Rectangling HTML
- Tidy data HTML
Downloads
Repository
- PRs merged (all time)
- 76%
- Median days to close, 50 most recently updated closed issues
- 94
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
19 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/tidyverse/tidyr on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-06-02 · The repository has a site deploy workflow
pkgdown site last built 2026-01-09
Show all practicesHide 3 practices
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2025-09-19Commits: at least 1 crediting it in the message
Dependencies
Installing tidyr adds 19 packages (11 with compiled code, 17 MB of source tarballs). Heaviest: stringi 11 MB, vctrs 1.0 MB, dplyr 902 KB.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 2,468 more dependents and 699 packages that suggest it on CRAN ↗
Code & Tests
Datasets
People & History
Maintainer since 0.1 (2014)
Show 4 peopleHide 4 people
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.3.2Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 1.3.12024-01-24 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.3.02023-01-24 · diff ↗ ·
added 5 exports
separate_longer_delim, separate_longer_position, separate_wider_delim, separate_wider_position, separate_wider_regex - 1.2.12022-09-08 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 1.2.0
- 1.1.42021-09-27 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.1.32021-03-03 · diff ↗
- 1.1.22020-08-27 · diff ↗
- 1.1.12020-07-31 · diff ↗
- 1.1.02020-05-20 · diff ↗
Show 29 earlier eventsHide 29 earlier events
- 1.0.32020-05-07 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 1.0.22020-01-24 · diff ↗
- 1.0.02019-09-12 · diff ↗ ·
added 29 exports
as_tibble, build_longer_spec, build_wider_spec, chop, contains, ends_with, everything, expand_grid, hoist, last_col, matches, nest_legacy, num_range, one_of, pack, pivot_longer, pivot_longer_spec, pivot_wider, pivot_wider_spec, starts_with, tibble, tidyr_legacy, tribble, unchop, unnest_auto, unnest_legacy, unnest_longer, unnest_wider, unpack - RR 3.6.0 released · 2019-04-26
- 0.8.32019-03-02 · diff ↗
- 0.8.22018-10-28 · diff ↗
- 0.8.12018-05-18 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 0.8.0
- 0.7.22017-10-17 · diff ↗
- 0.7.12017-09-01 · diff ↗
- 0.7.02017-08-16 · diff ↗
- 0.6.32017-05-15 · diff ↗
- 0.6.22017-05-04 · diff ↗
- RR 3.4.0 released · 2017-04-21
- 0.6.12017-01-10 · diff ↗
- 0.6.0
- 0.5.12016-06-14 · diff ↗
- 0.5.0
- RR 3.3.0 released · 2016-05-03
- 0.4.12016-02-05 · diff ↗
- 0.4.0
- 0.3.12015-09-10 · diff ↗
- 0.3.0
- 0.2.0
- RR 3.2.0 released · 2015-04-16
- 0.12014-07-21
- RR 3.1.0 released · 2014-04-10
Package metadata
- First published
- 2014-07-21
- Total releases
- 32 / 12 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 347 KB / 19 files
- Download size
- 790 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("tidyr")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.