powered by
Length of unique elements in a vector
uniqueLength(x, incomparables = FALSE)
An integer indicating the number of unique elements in the input vector
A vector
See unique
unique
Jitao David Zhang <jitao_david.zhang@roche.com>
test.vec1 <- c("HSV", "FCB", "BVB", "HSV", "BVB") uniqueLength(test.vec1) test.vec2 <- c(1L, 2L, 3L, 5L, 3L, 4L, 2L, 1L, 5L) ulen(test.vec2)
Run the code above in your browser using DataLab