Access or assign distribution parameters for \(S^{opt}_s\)
Source:R/adult_survival.R
adult_survival.RdThis 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) <- valueArguments
- object
a
sefraDataclass object- ...
additional arguments to the generic function (not used)
- value
a list or data frame with elements:
code,distribution,par1andpar2. Thecodeshould contain the three-letter species code or codes listed inspecies. Thedistributionmust be one of'uniform','beta'or'logit-normal'(seedistributions). Thepar1andpar2are 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