count_connections: Count Times Precincts are Connected

View source: R/count_connections.R

count_connectionsR Documentation

Count Times Precincts are Connected

Description

Count Times Precincts are Connected

Usage

count_connections(dm, normalize = FALSE)

Arguments

dm

district membership matrix

normalize

Whether to normalize all values by the number of columns.

Value

matrix with the number of connections between precincts

Examples

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

geomander documentation built on April 16, 2023, 5:18 p.m.