This is what I usually do:
(points is a dataframe with x and y columns)
library("sp")
coordinates(points)=~x+y
polygon<-readShapePoly("shapefile.shp")
a<-overlay(points,polygon)
# a will contain the id's of the polygons per point
# . to get the attributes for every point I use:
polygon[a,[EMAIL PR
On Fri, 2 Nov 2007, Honey Giroday wrote:
>
> Hi everyone
> I am a new useR running R on a Windows platform with Emacs. I have been
> searching package manuals and email archives trying to solve this
> problem but have been unable to find a solution. Your help with this is
> appreciated.
>
>
Hi everyone
I am a new useR running R on a Windows platform with Emacs. I have been
searching package manuals and email archives trying to solve this problem but
have been unable to find a solution. Your help with this is appreciated.
I have generated random points within a polygon shapefile