Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gsiinvperm

Internal function: Invert a permutation


Description

Finds the inverse of a permutation given as a vector of indices.

Usage

gsi2.invperm( i,n )

Arguments

i

a sequence of different integers in 1:n considered as a permutation given by p=unique(c(i,1:n))

n

the number of elements to be permuted

Details

The inverse permutation is defined by p[v]==1:n and v[p]==1:n.

Value

an integer vector v describing the inverse permutation of p.

Note

Do not use gsi.* functions directly since they are internal functions of the package

Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

See Also

Examples

#gsi2.invperm(c(2,3),10)

compositions

Compositional Data Analysis

v2.0-1
GPL (>= 2)
Authors
K. Gerald van den Boogaart <boogaart@hzdr.de>, Raimon Tolosana-Delgado, Matevz Bren
Initial release
2021-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.