Learn R Programming

nemBM (version 1.00.01)

globalDensity: Network density based on an image matrix and a partition

Description

Based on an image matrix and a partition it calculate the density of a whole network.

Usage

globalDensity(M, partition)

Value

Density of a whole network (a single value).

Arguments

M

Image matrix with block densities.

partition

A partition in a vector format. Each unique value (positive integers) represents one cluster.

Author

Marjan Cugmas

Examples

Run this code
M <- matrix(c(0.1, 0.4, 0.5, 0.3), nrow = 2)
partition <- c(1, 2, 2, 1, 1, 2, 2, 2, 1)
globalDensity(M = M, partition = partition)

Run the code above in your browser using DataLab