getQueenYearOfBirth {SIMplyBee}R Documentation

Access the queen's year of birth

Description

Level 0 function that returns the queen's year of birth.

Usage

getQueenYearOfBirth(x)

Arguments

x

Pop-class (one or more than one queen), Colony-class (one colony), or MultiColony-class (more colonies)

Value

numeric, the year of birth of the queen(s); named when theres is more than one queen; NA if 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)])

queen <- getQueen(colony)
queen <- setQueensYearOfBirth(queen, year = 2022)
getQueenYearOfBirth(queen)

getQueenYearOfBirth(getQueen(colony))
colony <- setQueensYearOfBirth(colony, year = 2030)
getQueenYearOfBirth(colony)

apiary <- setQueensYearOfBirth(apiary, year = 2022)
getQueenYearOfBirth(apiary)

[Package SIMplyBee version 0.3.0 Index]