Type: | Package |
Title: | Compute Energy Landscapes |
Version: | 1.1.0 |
Author: | Emilio Berti |
Maintainer: | Emilio Berti <emilio.berti@idiv.de> |
Description: | Compute energy landscapes using a digital elevation model raster and body mass of animals. |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | Rcpp, methods, terra |
Suggests: | knitr, rmarkdown, testthat (≥ 3.0.0) |
LinkingTo: | Rcpp |
RoxygenNote: | 7.2.0 |
Depends: | R (≥ 2.10) |
Config/testthat/edition: | 3 |
VignetteBuilder: | knitr |
NeedsCompilation: | yes |
Packaged: | 2024-01-29 10:36:33 UTC; eb97ziwi |
Repository: | CRAN |
Date/Publication: | 2024-01-29 13:20:02 UTC |
Create the initialization file for the julia package Circuitscape
Description
This creates the init file for the julia package Circuitscape: https://juliapackages.com/p/circuitscape.
Usage
circuitscape_skeleton(en = NULL, path = NULL, points = NULL)
Arguments
en |
an enerscape object. |
path |
full path where to write the .ini file. |
points |
data.frame with origin and destination coordinates. |
Value
Nothing, only write the circuitscape.ini file to disk.
Spatial distances
Description
Spatial distances
Usage
distances(x, center, res)
Arguments
x |
matrix with values |
center |
numeric value (double) with the value of the focal cell |
res |
numeric value (double) of the spatial resolution of the matrix |
Value
Vector with values the distances between x and center
Energy Landscape
Description
Energy Landscape
Usage
energy(slope, distance, mass, res, kcal = TRUE)
Arguments
slope |
vector with slopes |
distance |
vector with distances |
mass |
body mass of species (kg) |
res |
numeric value (double) of the spatial resolution of the matrix |
kcal |
(boolean) if to return the result in kCal (true) or J (false) |
Value
Vector with the energy cost of locomotion (EnergyScape)
Energy Landscape
Description
Energy Landscape
Usage
energyscape(x, n = 4L, mass = 0, res = 0, kcal = TRUE)
Arguments
x |
matrix with values the elevation. |
n |
(integer) number of neighbours to consider (either 4 or 8). |
mass |
body mass of species (kg). |
res |
numeric value (double) of the spatial resolution of the matrix. |
kcal |
(boolean) if to return the result in kCal (true) or J (false). |
Value
Matrix with the energy cost of locomotion (EnergyScape).
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)
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. |
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. doi:10.1098/rsbl.2015.0935.
Examples
library(terra)
library(enerscape)
data("volcano")
dem <- rast(volcano)
en <- enerscape(dem, 10, unit = "kcal", neigh = 16)
Neighbours
Description
Neighbours
Usage
neighbours(i, j, n, x)
Arguments
i |
row index |
j |
column index |
n |
number of neighbours (4 or 8) |
x |
matrix with values |
Value
Vector with values the neighours of x
Create the initialization file for the julia package Omniscape
Description
This creates the init file for the julia package Omniscape: https://juliapackages.com/p/omniscape.
Usage
omniscape_skeleton(en = NULL, path = NULL, radius = NULL, aggr_fact = 1)
Arguments
en |
an enerscape object. |
path |
full path where to write the .ini file. |
radius |
radius in pixels of the moving window. |
aggr_fact |
the block size to compute the Omniscape. |
Value
Nothing, only write the omniscape.ini file to disk.
Energy cost of transport from Pontzer (2016)
Description
Energy cost of transport from Pontzer (2016)
Usage
pontzer
Format
A data frame with 92 rows and 5 variables:
- Species
species name
- Incline
incline of movement
- Mass
species body mass
- Cost.of.Transport
cost of transport
- Source
original source of data
Source
References
#' Pontzer, H. (2016). A unified theory for the energy cost of legged locomotion. Biology Letters, 12(2), 20150935.
Monte Sirente Digital Elevation Model
Description
A matrix with the digital elevation mode of the Monte Sirente (Central Italy).
Usage
sirente
Format
An object of class matrix
(inherits from array
) with 393 rows and 594 columns.
Slopes
Description
Slopes
Usage
slope(x, center, res)
Arguments
x |
matrix with values |
center |
numeric value (double) with the value of the focal cell |
res |
numeric value (double) of the spatial resolution of the matrix |
Value
Vector with values the slopes (degrees) between x and center