Learn R Programming

geomander (version 2.3.0)

count_connections: Count Times Precincts are Connected

Description

Count Times Precincts are Connected

Usage

count_connections(dm, normalize = FALSE)

Value

matrix with the number of connections between precincts

Arguments

dm

district membership matrix

normalize

Whether to normalize all values by the number of columns.

Examples

Run this code
set.seed(1)
dm <- matrix(sample(1:2, size = 100, TRUE), 10)
count_connections(dm)

Run the code above in your browser using DataLab