title: R maps package - how to draw lines between cities within the country?
body: <p>I have an Esri shape file(a multipolygon), with all city of my county in my own country coordinate system (<code>srid:23700</code>). I would like to draw lines between cities? How can I do it in R?</p>
  
  <p>I tried to copy this pattern, I changed the country names to city names:</p>
  
  <pre><code>library(maptools)
  library(geosphere)
  
  data(wrld_simpl)
  
  US_lat = wrld_simpl$LAT[wrld_simpl$NAME == 'United States']
  US_lon = wrld_simpl$LON[wrld_simpl$NAME == 'United States']
  
  SWE_lat = wrld_simpl$LAT[wrld_simpl$NAME == 'Sweden']
  SWE_lon = wrld_simpl$LON[wrld_simpl$NAME == 'Sweden']
  
  points = gcIntermediate(c(US_lon, US_lat), c(SWE_lon, SWE_lat), 100)
  
  dev.new(width=6, height=4)
  plot(wrld_simpl)
  lines(points, col='red')
  </code></pre>
  
  <p>but that does not work</p>
  
  <p>I got this error: </p>
  
  <pre><code>Error in .pointsToMatrix(p1) : 
    points should be vectors of length 2, matrices with 2 columns, or inheriting from a SpatialPoints* object
  </code></pre>
  
  <p>I imported the data this way:</p>
  
  <pre><code>cities &lt;-readShapePoly("cities.shp")
  </code></pre>
  
  <p>I tried this one(not working), How can I specify my own projection???:</p>
  
  <pre><code>readShapeSpatial("cities.shp", proj4string=CRS("+proj=longlat"))
  </code></pre>
  
  <p>So I would like to make lines between cities.</p>
  
  <p>Thanks</p>