Yes, if country is already a numeric variable, that's the correct code. When you wrote
I took that to mean that it was a string variable.
but do have the names for all the countries within the dataset
Comment