Learn R Programming

ribiosUtils (version 1.5-6)

uniqueLength: Length of unique elements in a vector

Description

Length of unique elements in a vector

Usage

uniqueLength(x, incomparables = FALSE)

Arguments

x

A vector

incomparables

See unique

Value

An integer indicating the number of unique elements in the input vector

See Also

unique

Examples

Run this code
# 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