Skip to contents

Like unique(), but also sorted.

Usage

uniques(x)

Arguments

x

A vector.

Value

A sorted vector without duplicates.

See also

Examples

base::unique(c(3, 1, 2, 3))
#> [1] 3 1 2
uniques(c(3, 1, 2, 3))
#> [1] 1 2 3