getStateAbbreviation: Function for converting state/organization abbreviations to...

getStateAbbreviationR Documentation

Function for converting state/organization abbreviations to long form and back.

Description

The function getStateAbbreviation converts state/organization abbreviations to their long form and back. For example ID gets converted to Idaho.

Usage

getStateAbbreviation(
                    supplied.name,
	                SGPfunction=NULL,
	                type="ABBREVIATION")

Arguments

supplied.name

A character string state/organization abbreviation or long form name.

SGPfunction

SGP package function from which getStateAbbreviation is being called. Defaults to NULL.

type

Either Abbreviation or Long indicating whether the desired output is an Abbreviation (long form name is supplied) or the long form name (abbreviation is supplied). The default is Abbreviation.

Value

Returns a character string.

Author(s)

Damian W. Betebenner dbetebenner@nciea.org

Examples

getStateAbbreviation("IDAHO") ## ID
getStateAbbreviation("ID", type="Long") ## Idaho

SGP documentation built on Oct. 23, 2023, 5:08 p.m.