Using a simple for loop on spatial data
问题 I'm sorry this is going to be a for loop 101 question. I am struggling to write a simple for loop to generate a table of distances between cities based upon longitude-latitude data locations <-read.csv("distances.csv") locations returns the following table: City Type long lat 1 Sheffield EUR -1.470085 53.38113 2 HK WRLD 114.109497 22.39643 3 Venice EUR 12.315515 45.44085 4 New York WRLD -74.005941 40.71278 My goal in this particular part of the task is to produce a table of the distances (in