dist_info: Calculate Variation of Information Distances

View source: R/distances.R

dist_infoR Documentation

Calculate Variation of Information Distances

Description

Calculate Variation of Information Distances

Usage

dist_info(plans, shp, total_pop, ncores = 1)

Arguments

plans

A redist_plans object or plans_matrix where each row indicates a district assignment and each column is a plan.

shp

A redist_map object, tibble, or data frame containing other columns.

total_pop

Unqouted name of column in shp with total population.

ncores

Integer number of cores to use. Default is 1.

Value

matrix of plan distances

Examples

data(nh)
data(nh_m)
# For a single plan (distance is trivial, 0):
dist_info(plans = nh$r_2020, shp = nh, total_pop = pop)

# Or many plans:
dist_info(plans = nh_m[, 3:5], shp = nh, total_pop = pop)


redistmetrics documentation built on May 29, 2024, 8:02 a.m.