enerscape: Compute Energy Landscapes

View source: R/enerscape.R

enerscapeR Documentation

Compute Energy Landscapes

Description

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.

Usage

enerscape(dem, m, unit = "joule", neigh = 8, direction = "in")

Arguments

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'.

Details

From the digital elevation model, transition slopes, energy costs and conductances (1 / work) are computed based on the model described in Pontzer (2016).

Value

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.

References

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")}.

Examples

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"))

emilio-berti/enerscape documentation built on Sept. 9, 2024, 9:43 p.m.