decode_county: Convert County Codes to Full Names

Description Usage Arguments Details Value Author(s) See Also

View source: R/panthr.r

Description

decode_county converts county code fields into full-length names by evaluating a scalar or vector of values of class character. It also provides the option to include a "County" label.

Usage

1
decode_county(code, label = FALSE)

Arguments

code

A scalar or vector of length n and class character containing one or more county codes.

label

A logical value (i.e. TRUE or FALSE) to indicate whether returned county names should be labeled with "County". Defaults to FALSE.

Details

Output may be made categorical using function factor or as.factor. This function also allows for easily tallying counts using, e.g., function table.

Values containing unrecognized county codes are coerced to NA (missing) values and a warning message is thrown.

Value

A scalar or vector of values of class character containing full-length county names. Missing values are preserved.

Author(s)

Jamison R. Crawford, Institutional Research Associate, Georgia State University

See Also

table


jamisoncrawford/panthr documentation built on March 9, 2020, 6:18 p.m.