Learn R Programming

multiplex (version 2.3)

reduc: Reduce a matrix or array

Description

Function to reduce a matrix or array with a given clustering vector

Usage

reduc(x, clu, labels = NULL)

Arguments

x
a matrix or a three-dimensional array to be reduced
clu
a vector with the class membership
labels
(optional) the labels to be used in the reduction

Value

The reduced matrix or a three-dimensional array.

Details

Given a partition, this function serves to reduce either a matrix representing e.g. a partial order structure. However the reduction is also generalized a three-dimensional arrays representing multiple relations.

See Also

cngr, rbox, decomp

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)

## Reduce the multiplication table
reduc(s, clu=c(1,2,2))

Run the code above in your browser using DataLab