Calculates the smallest and largest distances to specified autocorrelation
values (e.g., 0.2) of the areal autocorrelation function (AACF). All 180
degrees from the origin of the AACF image are considered for the calculation.
A list containing the minimum and maximum distances from an
autocorrelation value of 1 to the specified autocorrelation values < 1.
Distances are in the units of the x, y coordinates of the raster image. If more
than one threshold value is specified, the order of this list will be
[minval(t1), minval(t2), maxval(t1), maxval(t2)].
Arguments
x
A raster or matrix.
threshold
A numeric vector containing values between 0 and 1. Indicates
the autocorrelation values to which the rates of decline are measured.
create_plot
Logical. Defaults to FALSE. If TRUE, the AACF and
lines showing the considered directions of autocorrelation from the origin
will be plotted.
# import raster imagedata(normforest)
normforest <- terra::unwrap(normforest)
# calculate Scl20, the minimum distance to an autocorrelation value of 0.2 in the AACFScl20 <- scl(normforest)[1]