NrUnique {actuaRE}R Documentation

Number of unique elements in a vector

Description

Number of unique elements in a vector

Usage

NrUnique(x, na.rm = TRUE)

Arguments

x

object of type vector.

na.rm

logical indicating if missing values have to be removed. Default to TRUE.

Value

vector with the number of unique elements

Examples

set.seed(1)
x = sample(letters, 50, TRUE)
NrUnique(x)

[Package actuaRE version 0.1.5 Index]