tidylists: Produce a data matrix with a unique row for each capture...

Description Usage Arguments Value Examples

Description

This routine finds rows with the same capture history and consolidates them into a single row whose count is the sum of counts of the relevant rows. If includezerocounts = T then it also includes rows for all the capture histories with zero counts; otherwise these are all removed.

Usage

1
tidylists(zdat, includezerocounts = F)

Arguments

zdat

Data matrix with t+1 columns. The first t columns, each corresponding to a particular list, are 0s and 1s defining the capture histories observed. The last column is the count of cases with that particular capture history. List names A, B, ... are constructed if not supplied. Where a capture history is not explicitly listed, it is assumed that it has observed count zero.

includezerocounts

If F then remove rows corresponding to capture histories with zero count. If T then include all possible capture histories including those with zero count, excluding the all-zero row corresponding to the dark figure.

Value

A data matrix in the form specified above, including all capture histories with zero counts if includezerocounts=T.

Examples

1
2
data(NewOrl)
zdat<-tidylists(NewOrl,includezerocounts=T)

SparseMSE/sparsemse documentation built on May 7, 2019, 7:13 p.m.