-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Devel vctrs::vec_rbind does not remove column names in list columns #1007
Comments
This is intended behaviour, the inner names are now correctly kept. |
Thanks! Do you know why the legacy behavior existed? Is this the behavior that |
It's what data.frame does: data.frame(x = 1:2, y = c(a = 1, b = 2))$y
#> [1] 1 2 Created on 2020-04-13 by the reprex package (v0.3.0) (But I now think that's tangled up with how data frames convert the names of the first column to row names) |
It was because we used |
Awesome, that background is super helpful, thanks! Is it worth noting this as a change / breaking change? It was a hard one to trace down, although perhaps it is unusual for someone to depend on something not having names. |
The NEWS item is now in a breaking change section, thanks for the report! |
This is breaking behavior for https://github.com/colearendt/tidyjson, so wanted to report it. It is not clear to me whether this is an intentional or unintentional change in behavior. It seems marginally related to #999 and #966.
As I think about this behavior, it seems almost desirable to keep the names - it was not clear to me why names were dropped in the first place (but we do depend on it in a few places, for better or worse. Others may as well).
I originally noticed the behavior in
tidyr::unnest()
and traced it here:original behavior
Notice that
chr "b"
is not namedCreated on 2020-04-13 by the reprex package (v0.3.0)
devel behavior
Notice that
chr "b"
retains its nameCreated on 2020-04-13 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: