Description Usage Arguments Value Author(s) See Also Examples
From a permutation vector p
, compute its inverse
permutation vector.
1 |
p |
an integer vector of length, say, |
zero.p |
logical indicating if |
zero.res |
logical indicating if the result should contain values
|
an integer vector of the same length (n
) as p
.
By default, (zero.p = FALSE, zero.res = FALSE
),
invPerm(p)
is the same as order(p)
or
sort.list(p)
and for that case, the function is
equivalent to invPerm. <- function(p) { p[p] <- seq_along(p) ; p }
.
Martin Maechler
the class of permutation matrices, pMatrix
.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.