Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. library(raster)
  2. library(rgdal)
  3. ## build a sensible file database (more than this, amazing how rarely it is done)
  4. fs <- list.files("nctree", etc. etc.)
  5. poly <- readOGR("folder/of/polys", "shapefilename")
  6. poly$vals <- extract(stack(fs), poly, fun = mean)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement