I have a Data.frame consisting of Longitude and Latitude called Points1, with which I use Voronoi polygon. I also have another Data.frame of Longitude and Latitude called Points2.
I then want to count the number of occurences of Points2 in each Voronoi Polygon. Regarding the plot, I want to count the occurences of triangles in each Polygon.
Sample code:
library("deldir")
Points1 <- data.frame(x=runif(10), y=runif(10))
Points2 <- data.frame(x=runif(100), y=runif(100))
x=Points1$x
y=Points1$y
vtess <- deldir(x, y)
plot(x, y, type="n", asp=1)
points(x, y, pch=20, col="red", cex=0.5)
points(Points2$x,Points2$y,pch=2)
plot(vtess, wlines="tess", wpoints="none", number=FALSE, add=TRUE, lty=1)