nFathersPoisson {SIMplyBee}R Documentation

Sample a number of fathers

Description

Sample a number of fathers - use when nFathers = NULL (see SimParamBee$nFathers).

This is just an example. You can provide your own functions that satisfy your needs!

Usage

nFathersPoisson(n = 1, average = 15)

nFathersTruncPoisson(n = 1, average = 15, lowerLimit = 0)

Arguments

n

integer, number of samples

average

numeric, average number of fathers

lowerLimit

numeric, returned numbers will be above this value

Details

nFathersPoisson samples from a Poisson distribution, which can return a value 0 (that would mean a failed queen mating).

nFathersTruncPoisson samples from a truncated Poisson distribution (truncated at zero) to avoid failed matings.

Value

numeric, number of fathers

Functions

See Also

SimParamBee field nFathers

Examples

nFathersPoisson()
nFathersPoisson()
n <- nFathersPoisson(n = 1000)
hist(n, breaks = seq(from = min(n), to = max(n)), xlim = c(0, 40))
table(n)

nFathersTruncPoisson()
nFathersTruncPoisson()
n <- nFathersTruncPoisson(n = 1000)
hist(n, breaks = seq(from = min(n), to = max(n)), xlim = c(0, 40))
table(n)

[Package SIMplyBee version 0.3.0 Index]