[R] points with-in boundaries of a map

Ray Brownrigg Ray.Brownrigg at ecs.vuw.ac.nz
Mon Mar 24 20:35:15 CET 2014


On 24/03/14 20:09, Frede Aakmann Tøgersen wrote:
:
> ## get ireland map as polygon, only for main island
> ## map.poly not exported so use maps:::map.poly
> ## use exact to leave out Achill Island and only get main island
> ie.polygon <- maps:::map.poly("world", "Ireland", exact = TRUE, as.polygon = TRUE)

Note it is not necessary to use the unexported map.poly() since
fill=TRUE achieves the same thing:

ie.polygon <- map("world", "Ireland", exact = TRUE, fill = TRUE, plot =
 FALSE)

Ray Brownrigg
maps maintainer




More information about the R-help mailing list