Skip to contents

This function can used to access or assign the distribution specifications for the 'optimal' adult survival per species (adult_survival) within the sefraData object.

Usage

adult_survival(object, ...)

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

adult_survival(object, ...) <- value

# S4 method for class 'sefraData,list'
adult_survival(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
adult_survival(dat) <- list(code = c('DIW', 'DQS', 'TWD'), 
   distribution = c('beta', 'beta', 'logit-normal'), par1 = 1:3, par2 = 4:6)
adult_survival(dat)
#>     distribution par1 par2
#> DIW         beta    1    4
#> DQS         beta    2    5
#> TWD logit-normal    3    6