-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
bind_rows() with columns of class "table" #2406
Comments
It is intended, but we could improve how A
There is not (and there was not) any specific code in dplyr's Before #2209, when two custom integer classes were combined they were treated as conventional integers, with some_lengths <- structure(c(1, 2, 3), unit = "m", class = "num_with_unit")
more_lengths <- structure(c(1, 2, 3), unit = "cm", class = "num_with_unit")
bind_rows(data_frame(x=some_lengths), data_frame(x=more_lengths))
After #2209 the code works, attributes are still dropped but a warning is given. This warning can help the user to guess that their "units" are lost and prevent further errors (see here how the default case for objects with a class gives a warning). Adding Thinking on I hope I have given a reasonable explanation. Comments are welcome and I am willing to help if needed, in the little spare time I currently have (I am writing my PhD thesis these months) Best |
Thanks. I see that after #2209 the I think we should revert to the old behavior and strip "unknown" classes, and perhaps add support for |
That sounds reasonable to me |
@zeehio: Would you like to contribute a fix? |
Yes, I will submit it in the following days 👍 |
now works, with a warning. Is this intended? CC @zeehio.
Stable version, and 8aa1bdb (the one before #2209):
Current
master
, and 0833d5b (which contains #2209):The text was updated successfully, but these errors were encountered: