orderedClu: Ordered clusters in a matrix network representation

Description Usage Arguments Value Author(s) See Also Examples

Description

This function reorder the groups in an image matrix in such a way that the blocks with a higher average weigh are placed on the left hand side of the matrix.

Usage

1
orderdClu(res)

Arguments

res

The object produced by the function oprRandParC from blockmodeling package.

Value

tclu

The vector indication to which group a certain unit belongs.

IMg

Reordered image matrix.

Author(s)

Marjan Cugmas, Aleš Žiberna

See Also

orderedIM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
orderdClu <- function(res){
  means<-fun.by.blocks(res, ignore.diag=TRUE)
  crit<-colSums(means)+rowSums(means)
  r <- order(crit, decreasing = TRUE)
  a <- IM(res)[1,,]
  a <- a[as.vector(r), as.vector(r)]
  IMg <- array(NA, dim = c(1, max(r), max(r)))
  (IMg[1,,] <-  a)
  r<-rank(-crit)
  names(r) <- 1:max(clu(res))
  tclu <- r[as.character(clu(res))]
  return(list(tclu, IMg))
}

nem documentation built on April 23, 2021, 3 p.m.

Related to orderedClu in nem...