point.in.polygon(point.x, point.y, pol.x, pol.y, mode.checked=FALSE)
# open polygon: point.in.polygon(1:10,1:10,c(3,5,5,3),c(3,3,5,5)) # closed polygon: point.in.polygon(1:10,rep(4,10),c(3,5,5,3,3),c(3,3,5,5,3))
Run the code above in your browser using DataCamp Workspace