reduc | R Documentation |
Function to reduce a matrix or an array with a given clustering vector.
reduc(x, clu, lbs = NULL, slbs = NULL, valued, row, col)
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 |
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.
The reduced matrix or a reduced three-dimensional array of the input data according to the clustering information.
Use decomp
for the reduction of a semigroup object.
Antonio Rivero Ostoic
cngr
, rbox
, decomp
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.