We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Dear Sir, It seems to me that n_distinct() fails with numeric variables. Best regards Emilio
library(hflights) library(dplyr) ## OK x <- hflights$ArrDelay class(x) # integer length(unique(x)) # 464 n_distinct(x) # 464 ## WRONG x <- as.numeric(hflights$ArrDelay) class(x) # numeric length(unique(x)) # 464 n_distinct(x) # 4085 sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=es_ES.UTF-8 LC_NUMERIC=C [3] LC_TIME=es_ES.UTF-8 LC_COLLATE=es_ES.UTF-8 [5] LC_MONETARY=es_ES.UTF-8 LC_MESSAGES=es_ES.UTF-8 [7] LC_PAPER=es_ES.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] dplyr_0.1.3 hflights_0.1 loaded via a namespace (and not attached): [1] assertthat_0.1 Rcpp_0.11.1 tools_3.0.2 ´´´
The text was updated successfully, but these errors were encountered:
4e1c033
romainfrancois
No branches or pull requests
Dear Sir,
It seems to me that n_distinct() fails with numeric variables.
Best regards
Emilio
The text was updated successfully, but these errors were encountered: