Guest User

Untitled

a guest
Jun 13th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. result$mean <- extract(raster, polygons, weights=T, na.rm=F, fun=mean)
  2. result$cells <- unlist(lapply(extract(raster, polygons, weights=T, na.rm=F),
  3. FUN = function(x)(length(x[,1]))))
  4. results$zeros <- unlist(lapply(extract(raster, polygons, weights=T, na.rm=F),
  5. FUN = function(x)(sum(x[,1]==0))))
Add Comment
Please, Sign In to add comment