Skip to contents

This function can used to access or assign the distribution specifications for the average annual probability of an adult breeding (p_breeding) within the sefraData object.

Usage

p_breeding(object, ...)

# S4 method for class 'sefraData'
p_breeding(object)

p_breeding(object, ...) <- value

# S4 method for class 'sefraData,list'
p_breeding(object) <- value

Arguments

object

a sefraData class object

...

additional arguments to the generic function (not used)

value

a list or data frame with elements: code, distribution, par1 and par2. The code should contain the three-letter species code or codes listed in species. The distribution must be one of 'uniform', 'beta' or 'logit-normal' (see distributions). The par1 and par2 are numeric values that paramaterise these distributions.

Note

During assignment of values to an sefraData object, the number of elements per list item or column must match the number of species contained in the object. If the codes do not match, then the assignment function will return an error. If the species codes or distributions are not recognised, the assignment function will also return an error.

Examples

library(sefra)
dat <- sefraData(c('DIW', 'DQS', 'TWD'))
#> species codes input: including all species-dependent capture codes
#> constructed 'sefraData' object
p_breeding(dat) <- list(code = c('DIW', 'DQS', 'TWD'), 
   distribution = c('uniform', 'beta', 'beta'), par1 = 1:3, par2 = 4:6)
p_breeding(dat)
#>     distribution par1 par2
#> DIW      uniform    1    4
#> DQS         beta    2    5
#> TWD         beta    3    6