validate_district: Validate that a district abbreviation is correct

View source: R/validate_district.R

validate_districtR Documentation

Validate that a district abbreviation is correct

Description

Validate that a district abbreviation is correct

Usage

validate_district(us_district)

Arguments

us_district

An integer corresponding to the district.

Value

TRUE if correct FALSE otherwise

Examples

## Not run: 
validate_district(1)#TRUE
validate_district(111) #FALSE
validate_district(us_congressional_districts$district[1]) #FALSE
validate_district(as.numeric(us_congressional_districts$district_number[1])) #TRUE

## End(Not run)

ProPublicaR documentation built on Sept. 8, 2023, 5:53 p.m.