eatfoodonce: eatfoodonce

Description Usage Arguments Value

View source: R/eatfood.R

Description

Simulates a single consumption event by a consumer and returns the carbon and nitrogen values for the consumed prey. Meant to be call by 'eatfoodsteps' and 'eatfood'.

Usage

1
eatfoodonce(num_sources, diet_prop, food)

Arguments

num_sources

integer, the number of food sources to choose from. Can not exceed the actual number of available food sources.

diet_prop

vector, the relative probability of selecting a source. Must have an entry for each source.

food

list, the simulated food sources from which to select.

Value

A vector containing the carbon, then nitrogen values for the prey item selected.


syanco/checkyourself documentation built on Jan. 18, 2021, 4:50 a.m.