Skip to content

list_transpose() and data frames #1109

@mmuurr

Description

@mmuurr

With the transition from transpose() to list_transpose() comes this (new) incompatibility:

> purrr::list_transpose(mtcars)
# Error in `purrr::list_transpose()`:
# ! `x` must be a list, not a <data.frame> object.
# Run `rlang::last_trace()` to see where the error occurred.

> is.list(mtcars)
# [1] TRUE

transpose(), however, still works as expected.

Was this an intentional change? (If there's any voting on the matter, I cast one vote to allow list_transpose() to operate on data frames, which are -- after all -- lists :-))

{purrr} v1.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviortidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-day

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions