NrUnique.Rd
Number of unique elements in a vector
NrUnique(x, na.rm = TRUE)
object of type vector.
vector
logical indicating if missing values have to be removed. Default to TRUE.
TRUE
vector with the number of unique elements
set.seed(1) x = sample(letters, 50, TRUE) NrUnique(x) #> [1] 22