get_county: Get the county-level FIPS code

Description Usage Arguments Value See Also Examples

View source: R/fips_functions.R

Description

get_county returns the 3-digit county FIPS code from a complete FIPS string.

Usage

1
get_county(fips, with_state = FALSE)

Arguments

fips

A character vector of complete FIPS strings.

with_state

Include the 2-digit state code? Default with_state = FALSE

Value

a character vector with the 3-digit county code, unless with_state = TRUE in which case a 5-digit state and county code concatenation.

See Also

get_state, get_tract

Examples

1
2
get_county(ctpp_flows$residence[1:10])
get_county(ctpp_flows$residence[1:10], with_state = TRUE)

gregmacfarlane/ctpp_flows documentation built on May 24, 2021, 11:05 a.m.