Skip to content

dplyr::group_nest() is advised in Iteration chapter, but may become deprecated #1700

@florisvdh

Description

@florisvdh

In the Iteration chapter, dplyr::group_nest() is advised in order to restructure a data frame in such a way that rows represent the unique combinations of grouping variables and the remaining variables are moved to a list column (list of tibbles).

However the documentation of dplyr::group_nest() currently states:

group_nest() is not stable because tidyr::nest(.by =) provides very similar behavior. It may be deprecated in the future.

So I'd suggest to indeed use nest(.by =) (or group_by() |> nest()). I could make a pull request to implement that if you like.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions