Skip to contents

Number of Unique Values

Usage

nUnique(x)

Arguments

x

R object that function unique can be applied on

Value

Number of unique values in x (integer)

Examples

nUnique(1:3)
#> [1] 3
nUnique(c(1, 1, 2))
#> [1] 2