getId {SIMplyBee}R Documentation

Get the colony ID

Description

Level 0 function that returns the colony ID. This is by definition the ID of the queen.

Usage

getId(x)

Arguments

x

Pop-class, Colony-class, or MultiColony-class

Value

character, NA when queen not present

Examples

founderGenomes <- quickHaplo(nInd = 8, nChr = 1, segSites = 100)
SP <- SimParamBee$new(founderGenomes)
basePop <- createVirginQueens(founderGenomes)

drones <- createDrones(x = basePop[1], nInd = 1000)
droneGroups <- pullDroneGroupsFromDCA(drones, n = 10, nDrones = nFathersPoisson)

# Create a Colony and a MultiColony class
colony <- createColony(x = basePop[2])
colony <- cross(colony, drones = droneGroups[[1]])
apiary <- createMultiColony(basePop[3:4], n = 2)
apiary <- cross(apiary, drones = droneGroups[c(2, 3)])

getId(getQueen(colony)) # Pop class
getId(colony) # Colony Class
getId(apiary) # MultiColony Class

colony2 <- removeQueen(colony)
getId(colony2)

[Package SIMplyBee version 0.3.0 Index]