createMultiColony {SIMplyBee} | R Documentation |
Create MultiColony object
Description
Level 3 function that creates a set of colonies. Usually to start a simulation.
Usage
createMultiColony(x = NULL, n = NULL, location = NULL)
Arguments
x |
|
n |
integer, number of colonies to create (if only |
location |
list, location of the colonies as |
Details
When both x
and n
are NULL
, then a
MultiColony-class
with 0 colonies is created.
Value
Examples
founderGenomes <- quickHaplo(nInd = 3, nChr = 1, segSites = 100)
SP <- SimParamBee$new(founderGenomes)
basePop <- createVirginQueens(founderGenomes)
# Create 2 empty (NULL) colonies
apiary <- createMultiColony(n = 2)
apiary
apiary[[1]]
apiary[[2]]
# Create 2 virgin colonies
apiary <- createMultiColony(x = basePop, n = 2) # specify n
apiary <- createMultiColony(x = basePop[1:2]) # take all provided
apiary
apiary[[1]]
apiary[[2]]
# Create mated colonies by crossing
apiary <- createMultiColony(x = basePop[1:2], n = 2)
drones <- createDrones(x = basePop[3], n = 30)
droneGroups <- pullDroneGroupsFromDCA(drones, n = 2, nDrones = 15)
apiary <- cross(apiary, drones = droneGroups)
apiary
apiary[[1]]
apiary[[2]]
[Package SIMplyBee version 0.3.0 Index]