n_distinct | R Documentation |
This is a faster version of length(unique(x))
that calls data.table::uniqueN()
.
n_distinct(..., na.rm = FALSE)
... |
vectors of values |
na.rm |
If |
x <- sample(1:10, 1e5, rep = TRUE)
n_distinct(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.