The analysis.R code will reproduce the analyses and figures for the research posted currently at bioRxiv. The paper has been provisionally accepted at Nature Ecology & Evolution.
The analysis.R
code will reproduce the analyses and figures for the research posted currently at bioRxiv. The paper has been provisionally accepted at Nature Ecology & Evolution.
The example.R
code contains a generic example of how the code might be used to calculate the surface descriptors for from any DEM. There are essentially three steps:
L
)scl
), the smallest scale automatically is the resolution (L0
)data
(geotif)x0
and y0
)height_variation()
function, which is essentially a wrapper function (see R/functions.R
). This function only requires the variables mentioned so far (L
, scl
, L0
, data
, x0
and y0
), so make sure there’re assigned. The output of the height_variation()
function is the DEM height range the prescribed scales. For the largest scale H
(or 2x2m) there is only one value for the entire patch, and the next scale down (1x1m) there are four values, and so on. Best to assign the output to a variable and save it somewhere (see the Example), because the smallest scales are very time-consuming.rdh()
function. This function only requires the output from height_variation()
. rdh()
sends back a list with several metrics:Variable | Description |
---|---|
D | Fractal dimension from model fit |
D_ends | Fractal dimension only considering the largest (L) and smallest (L0) scale |
D_theory | Fractal dimension calculated from theory (i.e., from R and H) |
R | Surface rugosity calculated using surfaceArea function in R |
R_theory | Surface rugosity calculated from theory () |
H | The height range (or height range at L) |