Takes the name of a county or msa and returns the associated fip(s) codes.
Usage
nameTofips(name, state, type = c("county", "msa"), statefips = FALSE)
Arguments
name
a character string, should be either a name of a county or msa.
state
a character string, can either be the full name (e.g. "oregon"), the abbreviation (e.g. "or"), or the FIPS code (e.g. "41")– note that if you are using the FIPS code you have to change statefips to TRUE.
type
a character string, should be either "county" or "msa"
statefips
logical, by default statefips=FALSE, change to TRUE when providing state with a FIPS code.
Zack W. Almquist (2010). US Census Spatial and Demographic Data in R: The UScensus2000 Suite of Packages. Journal of Statistical Software, 37(6), 1-31. http://www.jstatsoft.org/v37/i06/.