Closed iamgyang closed 1 month ago
Washington, DC is a city, while the function is designed to take a state name. "District of Columbia" gives the correct abbreviation (even though not actually a "state").
library(usdata)
state2abbr("District of Columbia")
# "DC"
state2abbr("washington dc") gives "WA" rather than "dc"