tidyr 0.8.3

tidyr 0.8.2

tidyr 0.8.1

tidyr 0.8.0

Breaking changes

New features

Bug fixes and minor improvements

tidyr 0.7.2

tidyr 0.7.1

This is a hotfix release to account for some tidyselect changes in the unit tests.

Note that the upcoming version of tidyselect backtracks on some of the changes announced for 0.7.0. The special evaluation semantics for selection have been changed back to the old behaviour because the new rules were causing too much trouble and confusion. From now on data expressions (symbols and calls to : and c()) can refer to both registered variables and to objects from the context.

However the semantics for context expressions (any calls other than to : and c()) remain the same. Those expressions are evaluated in the context only and cannot refer to registered variables. If you’re writing functions and refer to contextual objects, it is still a good idea to avoid data expressions by following the advice of the 0.7.0 release notes.

tidyr 0.7.0

This release includes important changes to tidyr internals. Tidyr now supports the new tidy evaluation framework for quoting (NSE) functions. It also uses the new tidyselect package as selecting backend.

Breaking changes

Switch to tidy evaluation

tidyr is now a tidy evaluation grammar. See the programming vignette in dplyr for practical information about tidy evaluation.

The tidyr port is a bit special. While the philosophy of tidy evaluation is that R code should refer to real objects (from the data frame or from the context), we had to make some exceptions to this rule for tidyr. The reason is that several functions accept bare symbols to specify the names of new columns to create (gather() being a prime example). This is not tidy because the symbol do not represent any actual object. Our workaround is to capture these arguments using rlang::quo_name() (so they still support quasiquotation and you can unquote symbols or strings). This type of NSE is now discouraged in the tidyverse: symbols in R code should represent real objects.

Following the switch to tidy eval the underscored variants are softly deprecated. However they will remain around for some time and without warning for backward compatibility.

Switch to the tidyselect backend

The selecting backend of dplyr has been extracted in a standalone package tidyselect which tidyr now uses for selecting variables. It is used for selecting multiple variables (in drop_na()) as well as single variables (the col argument of extract() and separate(), and the key and value arguments of spread()). This implies the following changes:

tidyr 0.6.3

tidyr 0.6.2

tidyr 0.6.1

tidyr 0.6.0

API changes

Bug fixes and minor improvements

tidyr 0.5.1

tidyr 0.5.0

New functions

Bug fixes and minor improvements

tidyr 0.4.1

tidyr 0.4.0

Nested data frames

nest() and unnest() have been overhauled to support a useful way of structuring data frames: the nested data frame. In a grouped data frame, you have one row per observation, and additional metadata define the groups. In a nested data frame, you have one row per group, and the individual observations are stored in a column that is a list of data frames. This is a useful structure when you have lists of other objects (like models) with one element per group.

Expanding

Minor bug fixes and improvements

tidyr 0.3.1

tidyr 0.3.0

New features

Bug fixes and minor improvements

tidyr 0.2.0

New functions

Bug fixes and minor improvements