create_model_Scaled {ATNr}R Documentation

Initialize an ATN model, following Delmas et al. 2017, Methods in Ecology and Evolution

Description

Initialize an ATN model, following Delmas et al. 2017, Methods in Ecology and Evolution

Usage

create_model_Scaled(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

Delmas, E., Brose, U., Gravel, D., Stouffer, D.B. and Poisot, T. (2017), Simulations of biomass dynamics in community food webs. Methods Ecol Evol, 8: 881-886. https://doi.org/10.1111/2041-210X.12713

Examples

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

[Package ATNr version 1.1.0 Index]