stateCdLookup: State code look up

View source: R/readNWISdata.R

stateCdLookupR Documentation

State code look up

Description

Function to simplify finding state and state code definitions. Used in readNWISdata and readWQPdata.

Usage

stateCdLookup(input, outputType = "postal")

Arguments

input

could be character (full name, abbreviation, id), or numeric (id)

outputType

character can be "postal", "fullName", "tableIndex", or "id".

Examples

fullName <- stateCdLookup("wi", "fullName")
abbriev <- stateCdLookup("Wisconsin", "postal")
id <- stateCdLookup("WI", "id")
name <- stateCdLookup(55, "fullName")
index <- stateCdLookup("WI", "tableIndex")
stateCd[index, ]
stateCdLookup(c("West Virginia", "Wisconsin", 200, 55, "MN"))

dataRetrieval documentation built on Oct. 31, 2024, 9:07 a.m.