Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(raster)
- library(rgdal)
- ## build a sensible file database (more than this, amazing how rarely it is done)
- fs <- list.files("nctree", etc. etc.)
- poly <- readOGR("folder/of/polys", "shapefilename")
- poly$vals <- extract(stack(fs), poly, fun = mean)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement