[R] Concatening two maps/shapefiles...

Nicolas Degallier nicolas.degallier at free.fr
Mon Feb 5 19:40:08 CET 2018


Dear All,
I'm new with mapping and using shapefiles in R.

I use the version: R 3.2.1 GUI 1.66 with Snow Leopard Mac OS (6956)

I want to build a map of the countries of Africa, in order to add points of collecting species of beetles, for later publishing.

library(maptools)
library(mapdata)

When I put the extreme coordinates of Africa, the map began only at longitude 0° and thus lacks the west africa part:

x<-map('world2Hires', xlim=c(-18,52), ylim=c(-35,38))

I attempted with the following script:


E<-map('world2Hires', xlim=c(0,52), ylim=c(-35,38))
W<-map('world2Hires', xlim=c(342,360), ylim=c(-35,38))

It ran fine but now I don't know how to get these two maps jointed.
I guess it may be trivial but I didn't found nothing about this in the available tutorials.
Cheers,
Nicolas Degallier



Nicolas Degallier
120 rue de Charonne
F-75011 Paris

nicolas.degallier at free.fr
Publications :
http://www.documentation.ird.fr/hor/DEGALLIER,NICOLAS/tout



More information about the R-help mailing list