uniqlen: Find Number of Unique Values

Description Usage Arguments Value Examples

View source: R/uniqlen.R

Description

Get the number of unique values in an input vector.

Usage

1
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

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

nima documentation built on May 21, 2018, 5:03 p.m.