buildClassTable: Convert capture counts to table of capture classes

View source: R/capwire-utils.R

buildClassTableR Documentation

Convert capture counts to table of capture classes

Description

Converts a vector of capture counts into a two-column matrix consisting of all capture classes and the individuals associated with each class.

Usage

buildClassTable(counts)

Arguments

counts

a vector of capture count data

Value

A two-column matrix with the first column specifiying the capture class (where all individuals in class i were caught i times) and the second column specifying the number of individuals in this capture class.

The data can be used as the data argument for any of the model-fitting functions implemented in capwire

Author(s)

Matthew W. Pennell

References

Miller C. R., P. Joyce and L.P. Waits. 2005. A new method for estimating the size of small populations from genetic mark-recapture data. Molecular Ecology 14:1991-2005.

Pennell, M. W., C. R. Stansbury, L. P. Waits and C. R. Miller. 2013. Capwire: a R package for estimating population census size from non-invasive genetic sampling. Molecular Ecology Resources 13:154-157.

See Also

fitTirm, fitEcm

Examples

## create a vector of capture counts

counts <- c(1,1,1,1,1,2,2,3,3,4,5)

## build table

d <- buildClassTable(counts)
d

mwpennell/capwire documentation built on Jan. 12, 2023, 11:19 a.m.