create_model_Unscaled {ATNr}R Documentation

Initialize an ATN model, following Binzer et al. 2016, Global Change Biology

Description

Initialize an ATN model, following Binzer et al. 2016, Global Change Biology

Usage

create_model_Unscaled(nb_s, nb_b, BM, fw)

Arguments

nb_s

integer, number of total species.

nb_b

integer, number of basal species.

BM

float vector, body mass of species.

fw

binary adjacency matrix of the food web.

Details

A model is defined by the total number of species (nb_s), the number of basal species (nb_b), the number of nutrients (nb_n), the body masses (BM) of species, and the adjacency matrix (fw) representing species interactions.

Value

An object of class ATN (Rcpp_parameters_prefs).

References

Binzer, A., Guill, C., Rall, B.C. and Brose, U. (2016), Interactive effects of warming, eutrophication and size structure: impacts on biodiversity and food-web structure. Glob Change Biol, 22: 220-227. https://doi.org/10.1111/gcb.13086 Gauzens, B., Rall, B.C., Mendonca, V. et al. Biodiversity of intertidal food webs in response to warming across latitudes. Nat. Clim. Chang. 10, 264-269 (2020). https://doi.org/10.1038/s41558-020-0698-z

Examples

library(ATNr)
set.seed(123)
n_species <- 50
n_basal <- 20
masses <- sort(10^runif(n_species, 1, 6)) #body mass of species
L <- create_Lmatrix(masses, n_basal)
fw <- L
fw[fw > 0] <- 1
mod <- create_model_Unscaled(n_species, n_basal, masses, fw)

[Package ATNr version 1.1.0 Index]