[R] points with-in boundaries of a map
Jim Lemon
jim at bitwrit.com.au
Sun Mar 23 04:19:43 CET 2014
On 03/23/2014 01:01 PM, eliza botto wrote:
> Dear UseRs,
> I have a question regarding reading the coordinates within a country' map. I drew map of ireland by using the following commands
> library("maps")
> library("mapproj")
> map("world", "ireland")
> map.axes()
> You can clearly see the axis labelled. What is want to do is to draw lines (both vertically and horizontally ) at an interval of 0.5. Which means if x-axis starts from -10 then the first be on -10 and second on -9.5 and so on. Similar has to be the case with y-axis.
> Afterwards I only want to read the coordinates of the point falling with in the boundary of ireland. I spent quite sometime while going through the previous posts but couldnt find the answer.
> Thankyou very much in advance,
> Elisa
Hi Elis(z)a,
The grid function doesn't work properly on maps, probably due to the
correction for the non-planar nature of the map. Try this:
abline(v=seq(-10,-6.5,by=0.5))
abline(h=seq(51.5,55.5,by=0.5))
Jim
More information about the R-help
mailing list