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

Pop-class, virgin queens or queens for the colonies (selected at random if there are more than n in Pop, while all are used when n is NULL)

n

integer, number of colonies to create (if only n is given then MultiColony-class is created with n NULL) individual colony - this is mostly useful for programming)

location

list, location of the colonies as c(x, y)

Details

When both x and n are NULL, then a MultiColony-class with 0 colonies is created.

Value

MultiColony-class

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]