Learn R Programming

multiplex (version 4.0)

perm: Array Permutation

Description

Function to permutate a given array of relations.

Usage

perm(x, clu, rev, lbs, sort)

Value

A permuted matrix or array

Arguments

x

Matrix or array to permute.

clu

Vector of cluster for permutation.

rev

(optional and logical) Revert order in clu?

lbs

(optional) Vector of labels after permutation.

sort

(optional and logical) Sort array according to labels?

Details

This function performs a permutation of a given array or matrix representing relations according to a clustering vector of membership.

See Also

cph, partial.order

Examples

Run this code
# scan the multiplication table data
s <- matrix(data=c(1, 1, 1, 3, 3, 3, 3, 3, 3), nrow=3, ncol=3, byrow=TRUE)

# the permutation as an endomorphism
perm(s, clu = c(1,2,3))

Run the code above in your browser using DataLab