codeToState: Convert state codes to state nnames

View source: R/MazamaSpatialUtils.R

codeToStateR Documentation

Convert state codes to state nnames

Description

Converts a vector of ISO 3166-2 alpha-2 state codes to the corresponding English names.

Usage

codeToState(stateCodes, countryCodes = NULL, dataset = "NaturalEarthAdm1")

Arguments

stateCodes

Vector of state codes.

countryCodes

Vector of ISO-3166-1 alpha-2 country codes the state might be found in.

dataset

Name of dataset containing state-level identifiers.

Details

For this function to work, you must install and load the "NaturalEarthAdm1" dataset.

Value

A vector of English state names or NA.

See Also

convertNaturalEarthAdm1


MazamaSpatialUtils documentation built on Sept. 8, 2023, 5:22 p.m.