Learn R Programming

mapping (version 1.4.1)

getNamesUS: USA names

Description

Retrieves USA statistical unit names.

Usage

getNamesUS(year = "2018",
           unit = c("region", "division","state", "county",
                    "district", "district_county", "urban_area"),
           id = FALSE, all_levels = TRUE)

Value

A character vector or a data frame with unit names and corresponding associated levels

Arguments

year

year of the analysis

unit

the type of statistical units

id

boolean value indicating whether the ids are returned instead of names

all_levels

a logical value indicating if all levels are returned or only the unit names

See Also

getNamesIT, getNamesEU, getNamesWR, getNamesUK, getNamesDE

Examples

Run this code

getNamesUS()

# \donttest{
getNamesUS(unit = "state")
getNamesUS(unit = "state", all_levels = FALSE)

getNamesUS(unit = "county")
getNamesUS(unit = "county", all_levels = FALSE)
# }

Run the code above in your browser using DataLab