traj: Extract Population Trajectories

trajR Documentation

Extract Population Trajectories

Description

Function traj is a generic method that extracts time and population sizes from population models. The plot function presents population size(s) against time.

Usage

traj(x, ...)
## S3 method for class 'traj'
plot(x, xlab = "Time (t)", ylab = "Population size", lwd = 2, 
    lty = 1, col =c(4,2), type = "l", ...)
## S3 method for class 'traj'
lines(x, ...)

Arguments

x

A population model or a "traj" object for plot.

xlab, ylab

Axis labels.

lwd, lty, col

Line width, type and colours.

type

The type of plot (defaults to "l"ines)

...

Other arguments passed to functions; plot passes these to matplot.

Details

The population growth models use traj to extract data for their plots. The plot function only shows the population sizes against time. For trajectories in models, see lines function with the appropriate model.

Value

Function returns a matrix with at least two columns. The first is time, and the later are population sizes.

Author(s)

Jari Oksanen

Examples

mod <- lotkacomp(1.4, 0.9, 30, 30)
plot(traj(mod, 10, 2))

jarioksa/ecostudy documentation built on June 27, 2022, 6:03 a.m.