Learn R Programming

SBMSplitMerge (version 1.1.1)

blocks: Blocks object

Description

create a blocks object

Usage

blocks(z, kappa)

Arguments

z

vector of block labels for each node

kappa

maximum number of blocks

Value

a blocks object

Details

stores the block allocations and total number of blocks for a stochastic block model

Examples

Run this code
# NOT RUN {
## Assign six nodes to four blocks:
b <- blocks(c(1,1,2,3,4,4), 4)
print(b)
plot(b) ## shows id two nodes are members of the same block
# }

Run the code above in your browser using DataLab