knt: Plot carrying capacity and abundance trajectories

Description Usage Arguments Value Note Examples

Description

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

Usage

1
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.

Note

When plotting many populations, layout should be set appropriately, and it may be useful to plot to, e.g., a pdf device.

Examples

1
2
3
4
5
6
7
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)

johnbaums/mptools documentation built on May 19, 2019, 3:03 p.m.