abundance.matrix: Abundance Matrix from a simulation

Description Usage Arguments Examples

Description

This function returns a matrix with abundances of each life stage/species over time. The rows in the matrix are the lifestages/species id. The times are in the row names. To visualize the abundance matrix data we recomment the function stackplot.

Usage

1
2
abundance.matrix(data, times = seq(0, data$maxtime, length.out = 50),
  by.age = FALSE, cap.living = FALSE)

Arguments

data

result of a simulation, created by community

times

array of times at which the abundances will be calculated

by.age

Logical. Use this option to get the number of individuals to reach each age, instead of abundances for each time.

cap.living

Logical. Use this option with by.age=T, to set the time of death of living individuals to max simulation time. Otherwise, living individuals are excluded from the data. Either way, this data will be more representative if only a small fraction of total individuals is living at the end of simulation.

Examples

1
2
3
4
5
data(malthusian)
times <- seq(0,malthusian$maxtime,by=0.1)
ab <- abundance.matrix(malthusian,times)

ab.by.age <- abundance.matrix(malthusian,times,by.age=TRUE)

Lobz/facilitation documentation built on May 7, 2019, 2:01 p.m.