New answers tagged large-datasets
An alternative would be to use the raster package. You can rasterize a polygon, mask to the polygon raster and then calculate information on the subset raster. This is quite fast compared to what you currently have implemented. require(raster) require(sp) # create example data r <- raster(ncol=500, nrow=500) r <- runif(ncell(r),0,1) cds1 <- ...
Top 50 recent answers are included