Skip to content

Allow pivot_longer(names_to = NULL) to produce no name columns #961

@mitchelloharawild

Description

@mitchelloharawild

A suggestion. Sometimes the column names provide no new/useful information as the values encode the same (or better) information. In this case, the names column is unwanted and dropped soon after the pivot.

If names_to can create one or more columns based on patterns, could it be extended to allow 0 columns to simplify the pivot_longer(names_to = "junk") %>% select(-junk) pattern?

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementhelp wanted ❤️we'd love your help!pivoting ♻️pivot rectangular data to different "shapes"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions