Skip to contents

Order a numeric vector in ascending order. Identical values are ordered in descending order of occurrence.

Usage

fastorder(x)

Arguments

x

numeric vector.

Value

fastorder returns a list with two elements:

  • x: numeric vector. The ordered version of the vector.

  • ix: numeric vector. The corresponding indices.

Examples

out <- fastorder(mtcars$cyl)