Skip to contents

This function can used to access or assign the distribution specifications for the probability of a breeding adult being on a nest per month per species (p_nest) within the sefraData object.

Usage

p_nest(object, ...)

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

p_nest(object, ...) <- value

# S4 method for class 'sefraData,array'
p_nest(object) <- value

Arguments

object

a sefraData class object

...

additional arguments to the generic function (not used)

value

an array containing fixed probability values \(0 \leq x \leq 1\). The array should have twelve columns labelled using abbreviated months. The row names should contain the three-letter species code or codes listed in species.

Note

During assignment of values to an sefraData object, the species codes included in the row names of the array are checked to ensure they match the species contained in the object. If the codes do not match, then the assignment function will 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_nest(dat) <- array(runif(36), dim = c(3, 12), 
   dimnames = list(c('DIW', 'DQS', 'TWD'), sefra::months))
p_nest(dat)
#>           Jan       Feb        Mar       Apr       May        Jun       Jul
#> DIW 0.3293172 0.8726303 0.66453006 0.6169146 0.8583281 0.01701569 0.9180106
#> DQS 0.9794742 0.9832837 0.38956404 0.5984750 0.5176812 0.67344783 0.6779781
#> TWD 0.7151861 0.2185630 0.04606364 0.4068536 0.9792934 0.37126988 0.6651525
#>           Aug       Sep       Oct        Nov       Dec
#> DIW 0.7560411 0.5088936 0.6376856 0.29865803 0.2179058
#> DQS 0.5428372 0.4172644 0.3964100 0.05020117 0.1258563
#> TWD 0.2392881 0.7269489 0.9594826 0.57618742 0.9381527