Learn R Programming

mptools (version 1.0.1)

knt: Plot carrying capacity and abundance trajectories

Description

Plot each population's carrying capacity and abundance over time.

Usage

knt(meta, kch, pops, samelims = FALSE, show_N = FALSE, results, ...)

Arguments

meta
The R object holding population info returned by meta.
kch
The R object holding kch data returned by kch.
pops
(Optional) A character vector of population names. The metapopulation will be subset to these populations before plotting. If not provided, all populations will be plotted (see Note below).
samelims
(logical) If TRUE, the y-axis limits will be constant across plots.
show_N
(logical) If TRUE, mean population abundance will be plotted (solid lines) in addition to carrying capacity (dashed lines).
results
(required only if show_N is TRUE) The R object holding simulation results returned by results.
...
Additional arguments to lattice::xyplot, e.g., layout.

Value

A lattice object is returned invisibly, and plotted if not assigned.

Examples

Run this code
mp <- system.file('example.mp', package='mptools')
met <- meta(mp)

# Subset of populations
knt(met, pops=c('Pop 169', 'Pop 170', 'Pop 174', 'Pop 175'), 
    kch(met, dirname(mp)), show_N=TRUE, results=results(mp),
    layout=c(2, 2), samelims=TRUE)

Run the code above in your browser using DataLab