Learn R Programming

secr (version 3.0.1)

shareFactorLevels: Fix Inconsistent Covariates

Description

Factor covariates can give trouble in multi-session models if the levels differ among sessions. A warning is provided by verify.capthist. This function forces factor covariates to use the same levels.

Usage

shareFactorLevels(object, columns = NULL)

Arguments

object
multi-session capthist object or list of traps or mask objects
columns
indices of columns to fix (default all)

Value

An object of the same class as input.

Details

Factor-valued covariates are coerced to use the same set of levels for each session of a multi-session capthist object or each component of a list of traps or masks. The combined level set is the union of all levels in separate sessions. The order of levels follows the default in factor (alphabetical).

See Also

verify.capthist