Skip to content
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

drop_na() is removing attributes from columns #905

Closed
xtimbeau opened this issue Mar 8, 2020 · 1 comment
Closed

drop_na() is removing attributes from columns #905

xtimbeau opened this issue Mar 8, 2020 · 1 comment
Labels
feature vctrs ↗️
Milestone

Comments

@xtimbeau
Copy link

xtimbeau commented Mar 8, 2020

drop_na() does not keep attributes of columns as shown below. I think it should.
thanks

ttbl <- tibble(col1 = c(1,2, NA, 2))
attr(ttbl$col1, "attr")<- "A value"
ttbl$col1
drop_na(ttbl)$col1
@hadley hadley added feature vctrs ↗️ labels Apr 1, 2020
@hadley hadley added this to the v1.1.0 milestone Apr 1, 2020
@hadley
Copy link
Member

hadley commented Apr 1, 2020

This looks like an easy fix — we just need to switch from [ to vec_slice()

@hadley hadley closed this as completed in 7c94459 Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature vctrs ↗️
Projects
None yet
Development

No branches or pull requests

2 participants