Moved from manually built dataframe of states and abbreviations to built-in R functions.
Added internal checks.
Original warned but didn't fail when provided >1 state (but only gave back one abbreviation). Not sure if that was intended, this one provides the correct number of abbreviations as sates provided, but can be modified to only accept a single state name
Moved from manually built dataframe of states and abbreviations to built-in R functions. Added internal checks.
Original warned but didn't fail when provided >1 state (but only gave back one abbreviation). Not sure if that was intended, this one provides the correct number of abbreviations as sates provided, but can be modified to only accept a single state name