Function to reduce a matrix or an array with a given clustering vector.
Usage
reduc(x, clu, lbs, slbs, valued, row, col)
Value
A reduced matrix or a reduced three-dimensional array of the input data according to the clustering information.
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.