sort_input {ATNr}R Documentation

Sort custom input

Description

Sort custom input

Usage

sort_input(BM, fw)

Arguments

BM

numeric vector, body mass of species.

fw

adjacency matrix of the 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.

Value

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

Examples

bm <- runif(10, 10, 50)
fw <- matrix(as.numeric(runif(100) > .9), 10, 10)
sort_input(bm, fw)

[Package ATNr version 1.1.0 Index]