Convert latitude and longitude coordinates to country name in R
问题 I have a list of latitude and longitude coordinates, and wish to find out which country they all reside in. I modified an answer from this question about lat-long to US states, and have a working function, but I run into the problem that the worldHires map (from the mapdata package) is hideously out of date and contains a lot of obsolete countries such as Yugoslavia and the USSR. How would I modify this function to use a more modern package, such as rworldmap ? I have only managed to