Learn R Programming

multiplex (version 2.3)

perm: Array Permutation

Description

Function to permutate a given array of relation.

Usage

perm(x, clu, rev = FALSE)

Arguments

x
a matrix or an array to be permuted
clu
the cluster for the permutation
rev
(logical) whether the order in clu sholud be reverted.

Value

A permuted matrix or array

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