powered by
This function will return all county FIPS codes for all counties within a state or states.
get_county_cd(state)
Character vector giving the name of state or states (not case sensitive) for which you would like to get county FIPS codes.
A character vector with the 5-digit FIPS codes for all counties within the specified state or states.
This function uses the county.fips dataset from the maps package to pull county FIPS for a state.
county.fips
maps
# NOT RUN { get_county_cd("Virginia") get_county_cd(c("North Carolina", "South Carolina")) # }
Run the code above in your browser using DataLab