fd | R Documentation |
Calculate fractal dimension
fd(data, method, lvec, keep_data = FALSE, diagnose = FALSE, ...)
data |
Digital elevation model of class RasterLayer or a triangular mesh of class mesh3d. |
method |
If data is a RasterLayer, possible methods are:"hvar", "area", "sd", and "cubes" (defaults to "hvar"). If data is a mesh3d, possible methods are "cubes" and "area" (defaults to "cubes"). |
lvec |
Vector of scales to use for calculation. |
keep_data |
Logical. Keep data? Default is FALSE. |
diagnose |
Logical. Show diagnostic plot and metrics? |
... |
Arguments from method-specific fd_ functions. |
Calculates fractal dimension using the specified method.
Note that methods are distinctly different and should not be mixed when comparing values for multiple objects.
See fd_hvar()
, fd_area()
, fd_cubes()
, fd_sd()
for details about each method.
If lvec
is not specified, a default based on resolution, extent, and method will be used.
The cubes
method is not recommended if the height range is much smaller than the extent of a 3d object or DEM, which is typically the case for DEMs.
Most objects and surfaces are not perfectly fractal. It is recommended to investigate scale transitions by setting diagnose to TRUE.
A value for fractal dimension, typically between 2 and 3 or a list if keep_data = TRUE.
fd_hvar()
fd_area()
fd_sd()
fd_cubes()
fd_diagnose()
dem <- dem_crop(horseshoe, x0 = -469, y0 = 1267, L = 2, plot = TRUE)
fd(dem, method = "hvar", lvec = c(0.125, 0.25, 0.5, 1, 2))
fd(dem, method = "area", diagnose = TRUE)
fd(dem, method = "sd")
fd(mcap2, method = "cubes", plot = TRUE)
fd(mcap2, method = "area", diagnose = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.