reduc: Reduce Matrices or Arrays

reducR Documentation

Reduce Matrices or Arrays

Description

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

Usage

reduc(x, clu, lbs, slbs, valued, row, col)

Arguments

x

Matrix or a three-dimensional array to be reduced.

clu

Vector with class membership in x.

lbs

(optional) Vector with labels for the reduced structure.

slbs

(optional) Vector with string labels in the reduced structure.

valued

(optional and logical) Should the reduction preserve valued data?

row

(optional and logical) Reduction by rows.

col

(optional and logical) Reduction by columns.

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 to three-dimensional arrays representing multiple relations or affiliation networks with either row or col.

Notice that the “reduction” of a semigroup of x is made through a decomposition process that is computed with function decomp.

Value

A reduced matrix or a reduced three-dimensional array of the input data according to the clustering information.

See Also

cngr, rbox, decomp

Examples

# 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
s |> reduc(clu=c(1,2,2))

multiplex documentation built on July 30, 2026, 5:13 p.m.