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 |
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
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)