Skip to content
Prev 23923 / 29559 Next

Percentage of forest cover in a set radius for each raster cell

you could check out the focal() function in the raster package:

1) turn your forest layer into a layer of 1 (presence) and 0 (absence)
2) use the function to sum the number of ones within a neighborhood of each
focal cell
3) convert the focal sum to an area
4) divide the area by the total possible area of the buffer

best, tim

On Sun, Jan 24, 2016 at 1:58 PM, Jeremy Larroque <larroque.jeremy at gmail.com>
wrote: