powered by
Length of unique elements in a vector
uniqueLength(x, incomparables = FALSE)
A vector
See unique
unique
An integer indicating the number of unique elements in the input vector
# NOT RUN { 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