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

n_distinct doesn't work as expected with lists #3669

Closed
idmn opened this issue Jun 13, 2018 · 3 comments
Closed

n_distinct doesn't work as expected with lists #3669

idmn opened this issue Jun 13, 2018 · 3 comments
Assignees
Labels
bug an unexpected problem or unintended behavior

Comments

@idmn
Copy link

idmn commented Jun 13, 2018

Consider this example:

x <- list(NULL, 1, 1)
length(unique(x))    
#> [1] 2

But:

dplyr::n_distinct(x)        
#> [1] 3
@romainfrancois romainfrancois self-assigned this Jun 14, 2018
@romainfrancois romainfrancois added bug an unexpected problem or unintended behavior data frame labels Jun 14, 2018
@krlmlr
Copy link
Member

krlmlr commented Jun 25, 2018

Is this a duplicate of #2355?

@romainfrancois
Copy link
Member

It's the same problem yes.

@lock
Copy link

lock bot commented Dec 22, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Dec 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants