Skip to content
Prev 24042 / 29559 Next

calculate "regional" slope

Thanks for the suggestion Chris.  I'm familiar with gdaldem, which
raster::terrain is based on, to compute slope from a dem. I now realize
that my example isnt a good one because neighbors=8 would achieve what I
described. However I actually want some flexibility such that I can
specifiy neighbors=16 so that it uses the next "ring" of cells.

I played around with focal() with weight argument =
matrix(rep(c(1,0,0,0,1),5),byrow=T) but couldn't figure out how to solve
for a directional slope.

On Fri, Feb 19, 2016 at 4:09 AM, chris english <
englishchristophera at gmail.com> wrote: