order_align: Return vector that reorders v to equal reference. Assuming...

View source: R/Rdata.R

order_alignR Documentation

Return vector that reorders v to equal reference. Assuming that two arguments are permutaions of each other, return a vector of indeces such that all(reference == v[order_align(reference, v)]) == TRUE for all vectors reference, v.

Description

Return vector that reorders v to equal reference.

Assuming that two arguments are permutaions of each other, return a vector of indeces such that all(reference == v[order_align(reference, v)]) == TRUE for all vectors reference, v.

Usage

order_align(reference, v)

Arguments

reference

vector with the reference ordering

v

vector that is to be ordered the same way as reference

Value

vector of indeces so that v[return_value] is the same as reference


sboehringer/package documentation built on Jan. 12, 2023, 6:33 a.m.