indToClass {capwire}R Documentation

Convert a table of individuals into a table of class data

Description

Converts a data frame consisting of individuals and their associated capture counts into a data frame where individuals are grouped by capture class.

Usage

indToClass(x)

Arguments

x

A two-column data frame with the first column specifiying the individual IDs and the second column specifying the number of times each individual was captured.

Value

A two-column data frame 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 frame can be used as the data argument for any of the model-fitting functions implemented in capwire

Author(s)

Matthew W. Pennell

References

Pennell M.W., C.R. Stansbury, L.P. Waits and C.R. Miller. submitted. capwire: A R Package for Estimating Population Census Size from Non-Invasive Genetic Sampling

See Also

buildIndTable, buildClassTable, classToInd

Examples

## create a vector of capture counts

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

## make into a table of individuals

ind.data <- buildIndTable(counts)

## convert to table of classes

data <- classToInd(ind.data)

data


[Package capwire version 1.1.4 Index]