Simple speedup: only apply toupper() on unique strings and then match the original vector on these. Not crucial but it saves a couple of seconds every time I use countrycode() in this direction. It uses a bit more memory though so whatever you prefer.
Simple speedup: only apply
toupper()
on unique strings and then match the original vector on these. Not crucial but it saves a couple of seconds every time I usecountrycode()
in this direction. It uses a bit more memory though so whatever you prefer.