Learn R Programming

mapping (version 1.2)

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)

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

Value

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

See Also

getNamesIT, getNamesEU, getNamesWR

Examples

Run this code
# NOT RUN {
getNamesUS()

# }
# NOT RUN {
getNamesUS(unit = "state")
getNamesUS(unit = "state", all_levels = FALSE)

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

Run the code above in your browser using DataLab