powered by
Count Times Precincts are Connected
count_connections(dm, normalize = FALSE)
matrix with the number of connections between precincts
district membership matrix
Whether to normalize all values by the number of columns.
set.seed(1) dm <- matrix(sample(1:2, size = 100, TRUE), 10) count_connections(dm)
Run the code above in your browser using DataLab