tidyverse / purrr

A functional programming toolkit for R

Home Page:https://purrr.tidyverse.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`list_transpose()` and data frames

mmuurr opened this issue · 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