uniqlen {nima}R Documentation

Find Number of Unique Values

Description

Get the number of unique values in an input vector.

Usage

uniqlen(vec, na.rm = TRUE)

Arguments

vec

A vector of any type.

na.rm

If TRUE, remove missing values.

Value

Number of unique values.

Examples

x <- c(1, 3, 1, 1, NA, 2, 2, 3, NA, NA, 1, 3, 1)
uniqlen(x)
uniqlen(x, na.rm = FALSE)

[Package nima version 0.6.2 Index]