inst/doc/redistmetrics.R

## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## -----------------------------------------------------------------------------
citation('redistmetrics')

## ---- eval = FALSE------------------------------------------------------------
#  if (!requireNamespace('remotes')) {
#    install.packages('remotes')
#  }
#  
#  remotes::install_github('alarm-redist/redistmetrics)

## ----setup--------------------------------------------------------------------
library(redistmetrics)

## -----------------------------------------------------------------------------
data(nh)

## -----------------------------------------------------------------------------
comp_reock(plans = nh$r_2020, shp = nh)

## -----------------------------------------------------------------------------
part_egap(plans = nh$r_2020, shp = nh, 
          rvote = nh$pre_20_rep_tru, dvote = nh$pre_20_dem_bid)

## -----------------------------------------------------------------------------
part_egap(plans = nh$r_2020, shp = nh, 
          rvote = nh$pre_20_rep_tru, dvote = nh$pre_20_dem_bid) %>% 
  by_plan()

Try the redistmetrics package in your browser

Any scripts or data that you put into this service are public.

redistmetrics documentation built on April 11, 2022, 5:08 p.m.