unlistClu {blockmodeling}R Documentation

Function for "unlisting" a partition.


Essentially, if the argument is a list (otherwise function just returns its argument), the function calls unlist on it. Before it, it however makes sure that names from different elements of the list to not repeat. The opposite of splitClu. The n argument of the splitClu is returned as an attribute. If renumber=TRUE (default), it is practically identical to unlistCluInt.


unlistClu(clu, renumber = FALSE)



A list representing a partition of units from different sets. Each element should be a partition for one set.


If TRUE (default), are renumbered so that they are 1:"total number of clusters". If any cluster "ID" is present in more than one set of units (one partition, one element of the list), this is done even if renumber = FALSE.


A vector representing a partition. It also has an attribute n with the number of units that were in each set.


Aleš Žiberna

See Also

clu, splitClu, unlistCluInt


n <- c(8,8) 
cluList <- c(rep(1:2, times = c(3, 5)), rep(5:6, times = c(3, 5)))
unlistClu(clu = clu)
unlistClu(clu = clu, renumber = FALSE)

[Package blockmodeling version 1.1.5 Index]