R/over.R

setMethod("over",
	signature(x = "Vegsoup", y = "SpatialPolygonsDataFrame"), 
		function(x, y, returnList = FALSE, fn = NULL, ...) {
			p <- SpatialPointsVegsoup(x)
			stopifnot(sp::identicalCRS(p, y))
			sites(x) <- cbind(sites(x), sp::over(p, y))
			return(x)
		}
)

Try the vegsoup package in your browser

Any scripts or data that you put into this service are public.

vegsoup documentation built on Feb. 24, 2021, 3 a.m.