Learn R Programming

SBMSplitMerge (version 1.1.1)

blockmat.numeric: Block matrix

Description

converts a vector of block assignments to a matrix of block assignments

Usage

# S3 method for numeric
blockmat(x, kappa)

# S3 method for factor blockmat(x, kappa)

Arguments

x

a numeric-vector of node-to-block assignments

kappa

number of blocks

Value

matrix with kappa rows and a 1 at (k,i) if node i is in block k under x