powered by
Calculates the slopes along the bearing area curve of a raster or matrix. Slopes are determined at points x, from point x - h to x + h.
slopecalc(x, h, f)
A dataframe with the slope for each segment with centerpoint x.
A vector of x values.
Spacing before and after each point. 2h is the distance over which slopes are calculated.
Bearing area function as calculated with bearing_area.
# import raster image data(normforest) # find the slopes along the bearing area curve ba <- bearing_area(normforest) x <- seq(0, 1, length.out = 100000) slopes <- slopecalc(x = x, h = 0.01, f = ba)
Run the code above in your browser using DataLab