unlistClu {blockmodeling}R Documentation

Function for "unlisting" a partition.

Description

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.

Usage

unlistClu(clu, renumber = FALSE)

Arguments

clu

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

renumber

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.

Value

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

Author(s)

Aleš Žiberna

See Also

clu, splitClu, unlistCluInt

Examples

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.4 Index]