Reduce a matrix or array

Share:

Description

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

Usage

1
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

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.

Value

The reduced matrix or a three-dimensional array.

Note

Use decomp for the reduction of a semigroup object.

Author(s)

Antonio Rivero Ostoic

See Also

cngr, rbox, decomp

Examples

1
2
3
4
5
## 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))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.