Learn R Programming

GraphAlignment (version 1.36.0)

InvertPermutation: Invert permutation

Description

Invert the permutation defined by the specified vector.

Usage

InvertPermutation(p)

Arguments

p
permutation vector

Details

The return value is a permutation vector equal to the inverse of the input permutation.

Examples

Run this code
  p <- rank(rnorm(10))
  pInv <- InvertPermutation(p)

Run the code above in your browser using DataLab