stageFreqMat: Convert a data frame or matrix into an sfMat object.

Description Usage Arguments Value

View source: R/functions.r

Description

Convert a data frame or matrix into an sfMat object, to be used with the likelihood functions mnLogLik, mnLogLik2 and poisLogLik.

Usage

1
stageFreqMat(data, timeVar, stageVars, N0 = NULL, gamma = NULL)

Arguments

data

A matrix or data frame containing stage frequency data where each row gives the sample at a specific time point.

timeVar

The name of the column of data holding the time variable, which defines at which time a sample is taken.

stageVars

A vector of names of the columns of data holding the stage counts. The vector should be ordered from the first to the last stage.

N0

The name of the column giving the known initial number of individuals at each sampling time. May be set to NULL if not known.

gamma

The name of the column giving the sampling effort at each time. Used by poisLogLik. May be set to NULL (the default).

Value

A data matrix of class sfMat.


jknape/stageFreq documentation built on May 19, 2019, 11:42 a.m.