Rfast (version 1.7.3)

Sort and unique numbers : Sort and unique

Description

Sort and unique numbers.

Usage

sort_unique(x)

Arguments

x
A Numeric vector.

Value

Returns the discrete values but sorted.

Details

This function implements the R's "unique" function using the C++'s.

See Also

sort_mat, sort_index, sort_cor_vectors

Examples

Run this code
y <- rnorm(100)
a <- sort_unique(y)
b <- sort.int(unique(y))
all.equal(as.vector(a),as.vector(b))

Run the code above in your browser using DataLab