Learn R Programming

popbio (version 1.0.1)

stage.vector.plot: Plot stage vector projections

Description

Plots short-term dynamics and convergence to stage stage distribution using stage vector projections.

Usage

stage.vector.plot(stage.vectors, proportions=TRUE, legend.coords="topright", 
        ylim=NULL, xlab="Years", ylab=NULL,  ... )

Arguments

stage.vectors
a matrix listing stage class vectors in columnw
proportions
plot proportional changes or total numbers, defaults to proportions.
legend.coords
a legend keyword or vector of x,y coordinates, defaults to top-right corner
ylim
the y limits of the plot, defaults to min and max values in stage.vector.projections
xlab
a label for the x axis
ylab
a label for the y axis
...
additional options are passed to plot function

Details

A plot of stage class projections

References

see section 2.2 in Caswell 2001

See Also

see pop.projection

Examples

Run this code
stages<-c("seedling", "vegetative", "flowering")
A<-matrix(c(
0,     0,     6,
0.4,  0.6,  0.02,
0.01,0.2,  0.25
), nrow=3, byrow=TRUE, 
    dimnames=list(stages,stages) 
)

n<-c(25,25,25)
p<-pop.projection(A,n, 15)


op <- par(ask = TRUE )
stage.vector.plot(p$stage.vectors)

stage.vector.plot(p$stage.vectors, prop=FALSE, legend=c(1,300))
## log scale
stage.vector.plot(p$stage.vectors, prop=FALSE, log='y', 
   legend="bottomright", ylab="Number in stage class (log scaled)")

par(op)

Run the code above in your browser using DataLab