create_model_Unscaled_nuts {ATNr}R Documentation

Initialize an ATN model, following Schneider et al. 2016, Nature Communication

Description

Initialize an ATN model, following Schneider et al. 2016, Nature Communication

Usage

create_model_Unscaled_nuts(nb_s, nb_b, nb_n = 2, BM, fw)

Arguments

nb_s

integer, number of total species.

nb_b

integer, number of basal species.

nb_n

integer, number of nutrients.

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. Nutrients are not counted as species.

Value

An object of class ATN (Rcpp_parameters_prefs).

Examples

library(ATNr)
set.seed(123)
n_species <- 50
n_basal <- 20
n_nutrients <- 2
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_Unscaled_nuts(n_species, n_basal, n_nutrients, masses, fw)

[Package ATNr version 1.1.0 Index]