This function generates sets of parameters against which to test the equations 10 to 16, which set up the pairiing frequencies during the breeding seas. This function has two uses. First, single sets of parameters can be generated for illustrating that logic of each equation, eg, a population vector (W,) set of carrying capacities (K) and the consequent territory allocations for plugging in to equations 10 to 16. Second, this function can create an an array of values to plug in to the equations to test that there are no situations where the function generates erroneous output. Such an array is already stored as test_dat_P

test_P_df_maker(
  wmin = 1,
  wmax = 100,
  wstep = 30,
  kmin = 1,
  kmax = 125,
  kstep = 30
)

Arguments

wmin

Winter carrying capacity minimum

wmax

Winter carrying capacity max

wstep

step size for creating vector of values between winter min and max

kmin

Summer (Breeding) carrying capacity minimum

kmax

Summer carrying capacity maximum

kstep

step size for creating vector of values between min and max

Details

Note that the equations sometimes don't work as expected when a K = 0, but this is a special case that isn't likely to be applicable.

Examples


test_P_df_maker(wmin=1,   wmax=10, wstep=5,kmin = 1, kmax=10, kstep=5)
#>    mg mp fg fp K.bc K.bk B.fc B.fk B.mc B.mk B.md  P
#> 1   1  1  1  1    1    1    1    1    1    1    0 NA
#> 2   6  1  1  1    1    1    1    1    1    1    5 NA
#> 3   1  6  1  1    1    1    1    1    1    1    5 NA
#> 4   6  6  1  1    1    1    1    1    1    1   10 NA
#> 5   1  1  6  1    1    1    1    1    1    1    0 NA
#> 6   6  1  6  1    1    1    1    1    1    1    5 NA
#> 7   1  6  6  1    1    1    1    1    1    1    5 NA
#> 8   6  6  6  1    1    1    1    1    1    1   10 NA
#> 9   1  1  1  6    1    1    1    1    1    1    0 NA
#> 10  6  1  1  6    1    1    1    1    1    1    5 NA
#> 11  1  6  1  6    1    1    1    1    1    1    5 NA
#> 12  6  6  1  6    1    1    1    1    1    1   10 NA
#> 13  1  1  6  6    1    1    1    1    1    1    0 NA
#> 14  6  1  6  6    1    1    1    1    1    1    5 NA
#> 15  1  6  6  6    1    1    1    1    1    1    5 NA
#> 16  6  6  6  6    1    1    1    1    1    1   10 NA
#> 17  1  1  1  1    6    1    2    0    2    0    0 NA
#> 18  6  1  1  1    6    1    2    0    6    0    1 NA
#> 19  1  6  1  1    6    1    2    0    6    0    1 NA
#> 20  6  6  1  1    6    1    2    0    6    0    6 NA
#> 21  1  1  6  1    6    1    6    1    2    0    0 NA
#> 22  6  1  6  1    6    1    6    1    6    1    0 NA
#> 23  1  6  6  1    6    1    6    1    6    1    0 NA
#> 24  6  6  6  1    6    1    6    1    6    1    5 NA
#> 25  1  1  1  6    6    1    6    1    2    0    0 NA
#> 26  6  1  1  6    6    1    6    1    6    1    0 NA
#> 27  1  6  1  6    6    1    6    1    6    1    0 NA
#> 28  6  6  1  6    6    1    6    1    6    1    5 NA
#> 29  1  1  6  6    6    1    6    1    2    0    0 NA
#> 30  6  1  6  6    6    1    6    1    6    1    0 NA
#> 31  1  6  6  6    6    1    6    1    6    1    0 NA
#> 32  6  6  6  6    6    1    6    1    6    1    5 NA
#> 33  1  1  1  1    1    6    1    1    1    1    0 NA
#> 34  6  1  1  1    1    6    1    1    1    1    5 NA
#> 35  1  6  1  1    1    6    1    1    1    1    5 NA
#> 36  6  6  1  1    1    6    1    1    1    1   10 NA
#> 37  1  1  6  1    1    6    1    6    1    1    0 NA
#> 38  6  1  6  1    1    6    1    6    1    6    0 NA
#> 39  1  6  6  1    1    6    1    6    1    6    0 NA
#> 40  6  6  6  1    1    6    1    6    1    6    5 NA
#> 41  1  1  1  6    1    6    1    6    1    1    0 NA
#> 42  6  1  1  6    1    6    1    6    1    6    0 NA
#> 43  1  6  1  6    1    6    1    6    1    6    0 NA
#> 44  6  6  1  6    1    6    1    6    1    6    5 NA
#> 45  1  1  6  6    1    6    1    6    1    1    0 NA
#> 46  6  1  6  6    1    6    1    6    1    6    0 NA
#> 47  1  6  6  6    1    6    1    6    1    6    0 NA
#> 48  6  6  6  6    1    6    1    6    1    6    5 NA
#> 49  1  1  1  1    6    6    2    0    2    0    0 NA
#> 50  6  1  1  1    6    6    2    0    6    0    1 NA
#> 51  1  6  1  1    6    6    2    0    6    0    1 NA
#> 52  6  6  1  1    6    6    2    0    6    0    6 NA
#> 53  1  1  6  1    6    6    6    1    2    0    0 NA
#> 54  6  1  6  1    6    6    6    1    6    1    0 NA
#> 55  1  6  6  1    6    6    6    1    6    1    0 NA
#> 56  6  6  6  1    6    6    6    1    6    1    5 NA
#> 57  1  1  1  6    6    6    6    1    2    0    0 NA
#> 58  6  1  1  6    6    6    6    1    6    1    0 NA
#> 59  1  6  1  6    6    6    6    1    6    1    0 NA
#> 60  6  6  1  6    6    6    6    1    6    1    5 NA
#> 61  1  1  6  6    6    6    6    6    2    0    0 NA
#> 62  6  1  6  6    6    6    6    6    6    1    0 NA
#> 63  1  6  6  6    6    6    6    6    6    1    0 NA
#> 64  6  6  6  6    6    6    6    6    6    6    0 NA


# Make a single vector of values
## This is useful for generating data for testing simple conditions;
## this is used in the examples of other function documentation
test_P_df_maker(wmin=10,   wmax=10, wstep=1,kmin = 10, kmax=10, kstep=1)
#>   mg mp fg fp K.bc K.bk B.fc B.fk B.mc B.mk B.md  P
#> 1 10 10 10 10   10   10   10   10   10   10    0 NA