Learn R Programming

CARE1 (version 1.1.0)

as.record: Transform observed data to ascertainment records

Description

Transform observed data to ascertainment records.

Usage

as.record(x)

Arguments

x
the matrix of the observed capture histories

Value

Details

x has one row per unit captured in the experiment. Each row is an observed capture history. It must contain only zeros and ones; the number one indicates a capture. In this case, the number of columns in the table represents the number of capture occasions in the experiment (noted t). Here is a fictive example of a data set of this type for t=3:
[1,] 0 1
0 [2,] 1
0 1 [3,]
0 1 0
[4,] 0 1
1 [5,] 1
0 1 [6,]
1 0 1
[7,] 0 0
1 [8,] 0
1 0 [9,]
0 1 0
[10,] 1 1
0 [1,] 0

Examples

Run this code
x=matrix(sample(0:1,300,TRUE),ncol=3)
as.record(x)

Run the code above in your browser using DataLab