sort_input function

Sort custom input

Sort custom input

sort_input(BM, fw)

Arguments

  • BM: numeric vector, body mass of species.
  • fw: adjacency matrix of the food web.

Returns

A list with sorted body masses (body.mass) and food web matrix (food.web).

Details

Body masses and food web matrix should be arranged with the first elements/columns being for basal species. This is a requirement for the Cpp class and must be enforced before initializing the Rcpp_Schneider and Rcpp_Delmas objects.

Examples

bm <- runif(10, 10, 50) fw <- matrix(as.numeric(runif(100) > .9), 10, 10) sort_input(bm, fw)
  • Maintainer: Benoit Gauzens
  • License: GPL (>= 2)
  • Last published: 2023-09-04

Useful links