Skip to content

pivot_longer() ptype arg updates and S3 extensions #1291

@DavisVaughan

Description

@DavisVaughan

In #1287 we updated names_ptypes = list() and values_ptypes = list() to instead have default values of NULL and accept a single empty ptype as the ptype that would be applied to all columns while pivoting longer. This was part of the larger unification of this idea in #1284.

The ptype arguments in particular are a little special because list() now has a different meaning than before. Previously it meant "no columns to apply a ptype for". Now it means "apply a list ptype on all the columns".

This is fine for tidyr itself, because the new default it NULL. But extension packages like dbplyr and sparklyr, which eventually call tidyr tools, will still be using the old default value of list(), which causes them to break.

What should we do here? Temporarily force list() to be equal to NULL for these two ptype related arguments with a warning? In the meantime we can open PRs for dbplyr and sparklyr to update them to the new defaults, and then remove this in the next version of tidyr.

Packages with the issue:

  • dbplyr
  • sparklyr
  • sf
  • tidyseurat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions