Learn R Programming

multiplex (version 3.7)

perm: Array Permutation

Description

Function to permutate a given array of relation.

Usage

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

Value

A permuted matrix or array

Arguments

x

a matrix or an array to be permuted

clu

the cluster for the permutation

rev

(optional and logical) whether the order in clu sholud be reverted.

lbs

(optional) the labels after the permutation

sort

(optional and logical) sort array according to labels?

Author

Antonio Rivero Ostoic

Details

This function serves to permutate an array representing relations according to a vector for the clustering 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