sort_cor_vectors: Sort

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Sort a vector coresponding to another.

Usage

1
2
sort_cor_vectors(x,y)
sort_index(x, descending = FALSE)

Arguments

x

A numeric vector.

y

A numeric vector to help sorting the x.

descending

A logical value for choosing asceding or descending order.

Details

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

Value

Returns the first argument but sorted acording to the second vector.

Author(s)

Manos Papadakis

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>

See Also

sort_mat, sort_unique

Examples

1
2
3
4
y <- rnorm(100)
x <- rnorm(100)
b <- sort_cor_vectors(x,y)
b <- sort_index(x)


Search within the Rfast package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.