eatfood: eatfood

Description Usage Arguments Value

View source: R/eatfood.R

Description

Wrapper function to iterate 'eatfoodsteps' across multiple individuals.

Usage

1
eatfood(num_individ, steps, num_sources, diet_prop, food)

Arguments

num_individ

Integer, the number of individuals to simulate

steps

Integer, the number of time steps to simulate. Passed to 'eatfoodsteps'.

num_sources

integer, the number of food sources to choose from. Can not exceed the actual number of available food sources. Passed to 'eatfoodsteps' and then to 'eatfoodonce'.

diet_prop

vector, the relative probability of selecting a source. Must have an entry for each source. Passed to 'eatfoodsteps' and then to 'eatfoodonce'.

food

list, the simulated food sources from which to select. Passed to 'eatfoodsteps' and then to 'eatfoodonce'.

Value

A list, each element of which represents an individual consumer and contains the time step matrix supplied by 'eatfoodsteps'.


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