tidylists {SparseMSE} | R Documentation |
Produce a data matrix with a unique row for each capture history
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 = TRUE
then it also includes rows for all the capture histories with zero count; otherwise
these are all removed.
Usage
tidylists(zdat, includezerocounts = FALSE)
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 zero count.
|
includezerocounts |
If FALSE then remove rows corresponding to capture histories with zero count.
If TRUE 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=TRUE
.
Examples
data(NewOrl)
zdat<-tidylists(NewOrl,includezerocounts=TRUE)
[Package
SparseMSE version 2.0.1
Index]