n_distinct | R Documentation |
This is the equivalent of length(unique(x))
for multiple vectors.
n_distinct(..., na.rm = FALSE)
... |
Vectors of values. |
na.rm |
|
x <- sample(1:10, 1e5, rep = TRUE)
length(unique(x))
n_distinct(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.