create_model_Scaled | R Documentation |
Initialize an ATN model, following Delmas et al. 2017, Methods in Ecology and Evolution
create_model_Scaled(nb_s, nb_b, BM, fw)
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. |
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.
An object of class ATN (Rcpp_parameters_prefs).
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
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.