Skip to content

Use .data in pack() #759

@yusuzech

Description

@yusuzech

In dplyr functions, the first argument are mostly .data to prevent possible conflicts. But in tidyr, most functions use data as the first argument. And it creates an issue that when setting data as column name.

For example:

Since data is already used as the first argument of pack() function, when using "data" as a column, it will throw an error message.

df <- tibble(x1 = 1:3, x2 = 4:6, x3 = 7:9, y = 1:3)
df %>% pack(data = c(x1, x2, x3), y = y) 

throws an error message:

Error: All elements of `...` must be named

The same applies to at least pack, unpack, chop and unchop

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorwipwork in progress

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions