get_tract: Get the tract-level FIPS code

Description Usage Arguments Value See Also Examples

View source: R/fips_functions.R

Description

get_tract returns the 6-digit tract FIPS code from a complete FIPS string.

Usage

1
get_tract(fips, with_state = FALSE)

Arguments

fips

A character vector of complete FIPS strings.

with_state

Include the 5-digit state and county code? Default with_state = FALSE. This returns the existing FIPS code.

Value

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

See Also

get_county, get_state

Examples

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

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