Learn R Programming

mra (version 2.3)

lines.cjs: lines.cjs

Description

Add a line to an existing CJS capture-recapture plot showing either N or survival estimates.

Usage

## S3 method for class 'cjs':
lines( x, what="n", animals=-1, occasions=-1, \dots )

Arguments

x
CJS object from F.cr.estim
what
Indicator for what to plot. what = "n" plots estimates of size (i.e,. $n.hat). what = "s" plots estimates of survival.
animals
Index of animals to plot. This is the row number for animals to include. E.g., if animals = c(1,4,10), the 1st, 4th, and 10th animals represented in the 1st, 4th, and 10th rows of the capture history matrix are plotted. Applies t
occasions
Sampling occasions to plot. This must match the occasions argument to the last plot.cjs. If the first element of occasions is <= 0,="" all="" occasions="" are="" plotted.="" otherwise,="" only="" listed="" in="" occasions
...
Additional arguments to lines (for N estimates) or matlines (for survival estimates). Arguments like col= and lty= may prove useful.

Value

  • Nothing. A value of 1 is invisibly returned.

Details

This is a utility function for plotting. Lines are added to the current plot. A current plot must be displayed.

See Also

plot.cjs, lines, matlines

Examples

Run this code
data(dipper.histories)
xy <- F.cjs.covars( nrow(dipper.histories), ncol(dipper.histories) )
for(j in 1:ncol(dipper.histories)){ assign(paste("x",j,sep=""), xy$x[,,j]) } 
dipper.cjs <- F.cjs.estim( ~1, ~x2+x3, dipper.histories )  # constant capture probability, period (i.e., flood) effects on survival

plot(dipper.cjs, type="s", animals=1)
lines(dipper.cjs, what="s", animals=c(4, 10))

Run the code above in your browser using DataLab