[R] point.in.polygon help

Daisy Englert Duursma daisy.duursma at gmail.com
Thu May 23 12:25:28 CEST 2013

It would be useful to know what your ultimate goal is.

On Wed, May 22, 2013 at 6:29 AM, karengrace84 <kgfisher at alumni.unc.edu> wrote:
> I am new to mapping with R, and I would like to use the point.in.polygon
> function from the sp package, but I am unsure of how to get my data in the
> correct format for the function. The generic form of the function is as
> follows:
> point.in.polygon(point.x, point.y, pol.x, pol.y, mode.checked=FALSE)
> I have no problem with the point.x and point.y inputs. I have a list of gps
> longitudes and latitudes that will go in fine. My problem is with the pol.x
> and pol.y input. My polygon is currently in the form of a
> SpatialPolygonsDataFrame created by inputting shp files with the rgdal
> package.
> How do I get a numerical array of the x- and y-coordinates from my polygon
> that will go into the point.in.polygon function?
> --
> View this message in context: http://r.789695.n4.nabble.com/point-in-polygon-help-tp4667645.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

Daisy Englert Duursma
Department of Biological Sciences
Room E8C156
Macquarie University, North Ryde, NSW 2109

Tel +61 2 9850 9256

More information about the R-help mailing list