[R] Calculating the focal mean of a raster using an annulus

2014-05-30 Thread Parks, Sean -FS
Hello esteemed R experts, I am attempting the use the 'focal' function in the raster package to calculate the mean of an annulus (as opposed to a focal mean of a circle or square). >From what I can tell, this requires me to generate a weights matrix and use >this matrix in the focal function.

[R] pixel based percentile among rasters

2013-12-19 Thread Parks, Sean -FS
Hi, Say I have 1000 rasters, or a raster stack composed of 1000 rasters. I am interested in knowing the percentile for each pixel among these 1000 rasters. The result would be 1000 rasters, each depicting the percentile value of each pixel among the 1000 original rasters. Can anyone please of