purrr icon indicating copy to clipboard operation
purrr copied to clipboard

`list_transpose()` and data frames

Open mmuurr opened this issue 1 year ago • 0 comments

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

mmuurr avatar Nov 20 '23 17:11 mmuurr