enerscape {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)
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. |
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. doi:10.1098/rsbl.2015.0935.
library(terra)
library(enerscape)
data("volcano")
dem <- rast(volcano)
en <- enerscape(dem, 10, unit = "kcal", neigh = 16)