source("http://personality-project.org/r/useful.r") #get some extra functions, including read.clipboard() cities <- read.csv("https://www.christianlindke.com/uploads/2/8/0/0/28002995/cities.csv") #take the data from clipboard cities #show the data city.location <- cmdscale(cities, k=2) #ask for a 2 dimensional solution round(city.location,0) #print the locations to the screen plot(city.location,type="n", xlab="Dimension 1", ylab="Dimension 2",main ="cmdscale(cities)") #put up a graphics window text(city.location,labels=names(cities)) #put the cities into the map city.location <- -city.location plot(city.location,type="n", xlab="Dimension 1", ylab="Dimension 2",main ="cmdscale(cities)") #put up a graphics window text(city.location,labels=names(cities)) #put the cities into the map