stdz_district: Standardize District

Description Usage Arguments Value

Description

This function takes a district, vector of districts or state and district seperately and returns standardized district names.

Usage

1
2
3
stdz_district <- function(full_district = character(), state, 
district, denote_sen = "00", denote_al = "01", sep = "-", 
old_sep = NA, sep_loc = NA)

Arguments

full_district

district or vector of districts.

state

state abbreviation or vector of state abbreviations.

district

district number or vector of district numbers.

denote_al

character to denote at large districts, in the district column, defaults to 01.

sep

separator to use in the new standardized district names, if old_sep is not specified it is also the separator input districts are split on.

sep_old

separator to split input districts on. Overrides sep for this role.

sep_loc

location to split state from district. Use if there is no separator between state abbreviation and district number in the input.

Value

A vector of standardized districts


alexanderfurnas/congressTools documentation built on May 11, 2019, 7:26 p.m.