David Kikuchi
2012-Jan-17 18:53 UTC
[R] Change state names to abbreviations in an irregular, list of names, abbreviations, null values, and foreign provinces
Thanks! Both solutions work well for the problem that I described, although I failed to mention that there are also pre-abbreviated names in the list that I'm working with, and the second solution returns NA's for these (but there are plenty of ways around this). Sample data might be: State.Province <- c("Cusco", "TX", "unknown", "Texas", NA, "Louisiana") David