Methods for extracting stage-class information from CompadreMat or CompadreDB objects, including whether the matrix population model includes one or more propagule stages (mpm_has_prop), dormant stages (mpm_has_dorm), or active stages (mpm_has_active), and the integer index of the first active stage class (mpm_first_active).

These methods will return a single value if passed a CompadreMat object, or a vector of values if passed a CompadreDB object (one value for every CompadreMat object within the column 'mat').

mpm_has_prop(object)

# S4 method for CompadreMat
mpm_has_prop(object)

# S4 method for CompadreDB
mpm_has_prop(object)

mpm_has_active(object)

# S4 method for CompadreMat
mpm_has_active(object)

# S4 method for CompadreDB
mpm_has_active(object)

mpm_has_dorm(object)

# S4 method for CompadreMat
mpm_has_dorm(object)

# S4 method for CompadreDB
mpm_has_dorm(object)

mpm_first_active(object)

# S4 method for CompadreMat
mpm_first_active(object)

# S4 method for CompadreDB
mpm_first_active(object)

Arguments

object

A CompadreMat or CompadreDB object

Value

No return value, called for side effects

See also

Other data checking: cdb_check_species(), cdb_collapse(), cdb_compare(), cdb_flag()

Author

Patrick Barks <patrick.barks@gmail.com>

Examples

# with CompadreMat object mpm_has_prop(Compadre$mat[[1]])
#> [1] FALSE
mpm_has_active(Compadre$mat[[1]])
#> [1] TRUE
mpm_has_dorm(Compadre$mat[[1]])
#> [1] FALSE
mpm_first_active(Compadre$mat[[1]])
#> [1] 1
# with CompadreDB object mpm_has_prop(Compadre)
#> [1] FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE #> [13] FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE #> [25] FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE #> [37] TRUE FALSE TRUE FALSE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE #> [49] FALSE TRUE TRUE TRUE TRUE FALSE TRUE TRUE FALSE TRUE TRUE FALSE #> [61] FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE #> [73] FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE #> [85] TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE #> [97] TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE #> [109] TRUE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE TRUE #> [121] TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE FALSE TRUE TRUE #> [133] FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE TRUE #> [145] TRUE FALSE FALSE FALSE TRUE FALSE
mpm_has_active(Compadre)
#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [13] TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE #> [25] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [37] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [49] TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [61] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [73] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [85] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [97] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [109] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [121] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [133] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [145] TRUE TRUE TRUE TRUE TRUE TRUE
mpm_has_dorm(Compadre)
#> [1] FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [13] FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE #> [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE #> [37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [49] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [61] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE #> [73] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [85] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE #> [97] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [109] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE #> [121] FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [133] FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [145] FALSE FALSE TRUE FALSE FALSE TRUE
mpm_first_active(Compadre)
#> [1] 1 2 1 1 1 1 1 1 1 1 2 2 1 1 2 2 1 1 NA 1 1 2 1 1 1 #> [26] 1 1 1 1 1 1 1 1 2 1 1 2 1 2 1 2 1 1 1 4 1 2 1 1 2 #> [51] 2 NA 2 1 2 2 1 2 2 1 1 1 2 1 1 1 1 1 2 1 1 2 1 1 2 #> [76] 1 3 2 1 1 1 1 2 1 2 1 1 1 1 1 2 1 1 2 2 1 2 1 1 1 #> [101] 1 1 3 2 1 1 1 1 2 2 1 1 2 1 1 1 1 1 1 2 2 1 1 3 1 #> [126] 3 2 1 4 1 2 5 1 1 2 2 1 1 1 1 1 1 2 2 2 1 1 1 2 1