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

tibble() should silently drop NULL columns #580

Closed
hadley opened this issue Feb 20, 2019 · 6 comments
Closed

tibble() should silently drop NULL columns #580

hadley opened this issue Feb 20, 2019 · 6 comments
Labels
vctrs ↗️ Requires vctrs package

Comments

@hadley
Copy link
Member

hadley commented Feb 20, 2019

To be consistent with tidyverse/design#24

And it would also make tibble(x = 1, y = NULL) return the same as:

df <- tibble(x = 1)
df$y <- NULL
@krlmlr
Copy link
Member

krlmlr commented Feb 22, 2019

What should tibble(a = 1, a = NULL) do?

@hadley
Copy link
Member Author

hadley commented Feb 22, 2019

I think the current behaviour of throwing an error about duplicated columns is probably correct.

@krlmlr
Copy link
Member

krlmlr commented Feb 22, 2019

According to the principles a = NULL would be treated as absent.?

@hadley
Copy link
Member Author

hadley commented Feb 22, 2019

The principles aren't set in stone yet.

@hadley
Copy link
Member Author

hadley commented Feb 28, 2019

The question is really about which principle (names must be unique; NULL columns are silently dropped) should be applied first. I don't have a strong argument either way, so do whatever is easiest to implement.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
vctrs ↗️ Requires vctrs package
Projects
None yet
Development

No branches or pull requests

2 participants