R/misc.R
lengthu.Rd
Counts unique values
lengthu(x)
a vector
A numeric scalar giving the number of distinct values in x.
x
x <- c(5, 7, 8, 9, 5, 7) length(x) #> [1] 6 lengthu(x) #> [1] 4