reduc: Reduce a matrix or array

reducR Documentation

Reduce a matrix or array

Description

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

Usage

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

Arguments

x

a matrix or a three-dimensional array to be reduced

clu

a vector with the class membership

lbs

(optional) the labels to be used in the reduction

slbs

(optional) the string labels to be used in the reduction

valued

(logical) whether the reduction should preserve valued data?

row

(optional) the reduction by rows

col

(optional) the 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.

Value

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

Note

Use decomp for the reduction of a semigroup object.

Author(s)

Antonio Rivero Ostoic

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


multiplex documentation built on Nov. 16, 2023, 5:08 p.m.