ungroup_data: Ungroup encounter capture-recapture data in individual...

View source: R/ungroup_data.R

ungroup_dataR Documentation

Ungroup encounter capture-recapture data in individual histories

Description

This function splits encounter histories in as many individual histories as required.

Usage

ungroup_data(X, effX)

Arguments

X

matrix of encounter capture-recapture histories

effX

vector with numbers of individuals with that particular encounter history

Value

matrix with ungrouped capture-recapture histories and counts in the last column (should be 1s)

Author(s)

Olivier Gimenez <olivier.gimenez@cefe.cnrs.fr>, Roger Pradel, RĂ©mi Choquet

Examples

# Generate fake capture-recapture dataset
X = matrix(round(runif(9)),nrow=3)
freq=c(4,3,-8)
cbind(X,freq)
ungroup_data(X,freq)

R2ucare documentation built on July 11, 2022, 9:06 a.m.