Skip to contents

order2 returns a permutation which rearranges its first argument into ascending order.

Usage

order2(x)

# S3 method for class 'hclust'
order2(x)

# S3 method for class 'dendrogram'
order2(x)

# S3 method for class 'ser_permutation_vector'
order2(x)

# S3 method for class 'ser_permutation'
order2(x)

Arguments

x

Any objects can be extracting ordering.

Value

An integer vector unless any of the inputs has 2^31 or more elements, when it is a double vector.

Examples

order2(hclust2(matrix(rnorm(100L), nrow = 10L)))
#>  [1]  5  6  2  3  9  1  4  8  7 10