Learn R Programming

popdemo (version 0.1-2)

S3 plot method for projections: Plot population dynamics

Description

Plot dynamics of a specified population projection matrix (PPM) model.

Usage

## S3 method for class 'projection':
plot(x, labs=TRUE, ...)

Arguments

x
an object of class 'projection' created using project.
labs
logical: if FALSE, then lines are not labelled in stage-biased projections.
...
arguments to be passed to methods: see par and plot.

Details

Plots population dynamics (time series of density) for objects of class 'projection' created using project. The method is particularly useful for sets of stage-biased projections (which project creates by default when vector="n").

See Also

project

Examples

Run this code
# Create a 3x3 PPM
    A <- matrix(c(0,1,2,0.5,0.1,0,0,0.6,0.6), byrow=TRUE, ncol=3)
    A

    # Create an initial stage structure
    initial <- c(1,3,2)
    initial

    # plot stage-biased dynamics of A over 70 intervals using
    # standardised dynamics and log y axis
    plot(project(A,time=70,standard.A=TRUE,standard.vec=TRUE),
         log="y",ylab="Years",xlab="Density")

    # plot a projection of a specified initial stage structure
    # for 10 intervals
    plot(project(A,vector=initial,time=50))

Run the code above in your browser using DataLab