slopecalc | R Documentation |
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)
x |
A vector of x values. |
h |
Spacing before and after each point. 2h is the distance over which slopes are calculated. |
f |
Bearing area function as calculated with bearing_area. |
A dataframe with the slope for each segment with centerpoint x.
# import raster image
data(normforest)
normforest <- terra::unwrap(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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.