enerscape | R Documentation |
This is the main function to compute energy landscapes from a digital elevation model and body mass of animals based on the model from Pontzer (2016). The core of the computations are done using the gdistance (Etten, 2017) package.
enerscape(dem, m, unit = "joule", neigh = 8, direction = "in")
dem |
raster file of the digital elevation model, either a raster or a full path location of the file. |
m |
species body mass (kg). |
unit |
if joules ('joule') or kilocalories ('kcal'). |
neigh |
number of neighbor cells that are connected together. |
direction |
character specifying if costs are to be calcualted for moving into the focal cell ('in'), from it ('out'), or for a specific direction ,i.e. 'up', 'down', 'left', 'right'. |
From the digital elevation model, transition slopes, energy costs and conductances (1 / work) are computed based on the model described in Pontzer (2016).
A list with elements a rasterStack of the digital elevation model, slope, energy landscape, and conductance and the conductance as a transitionLayer for path analysis.
Pontzer, H. (2016). A unified theory for the energy cost of legged locomotion. Biology Letters, 12(2), 20150935. \Sexpr[results=rd]{tools:::Rd_expr_doi(" https://doi.org/10.1098/rsbl.2015.0935")}.
library(terra)
library(enerscape)
data("sirente")
dem <- rast(sirente)
en <- enerscape(dem, 10, unit = "kcal", neigh = 8)
plot(en, col = hcl.colors(100, "Inferno"))
contour(dem, add = TRUE, nlevels = 5, col = hcl.colors(7, "Terrain"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.