isCaste {SIMplyBee} | R Documentation |
Is individual a member of a specific caste
Description
Level 0 function that tests if individuals are members of a specific caste
Usage
isCaste(x, caste, simParamBee = NULL)
isQueen(x, simParamBee = NULL)
isFather(x, simParamBee = NULL)
isWorker(x, simParamBee = NULL)
isDrone(x, simParamBee = NULL)
isVirginQueen(x, simParamBee = NULL)
Arguments
x |
|
caste |
character, one of "queen", "fathers", "workers", "drones", or "virginQueens"; only single value is used |
simParamBee |
|
Value
logical
Functions
-
isQueen()
: Is individual a queen -
isFather()
: Is individual a father -
isWorker()
: Is individual a worker -
isDrone()
: Is individual a drone -
isVirginQueen()
: Is individual a virgin queen
See Also
isQueen
, isFather
,
isVirginQueen
, isWorker
, and
isDrone
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 class
colony <- createColony(x = basePop[2])
colony <- cross(colony, drones = droneGroups[[1]])
colony <- buildUp(x = colony, nWorkers = 120, nDrones = 20)
colony <- addVirginQueens(x = colony, nInd = 4)
isCaste(getQueen(colony), caste = "queen")
isCaste(getFathers(colony, nInd = 2), caste = "fathers")
isCaste(getWorkers(colony, nInd = 2), caste = "workers") # random sample!
isCaste(getDrones(colony, nInd = 2), caste = "drones")
isCaste(getVirginQueens(colony, nInd = 2), caste = "virginQueens")
bees <- c(
getQueen(colony),
getFathers(colony, nInd = 2),
getWorkers(colony, nInd = 2),
getDrones(colony, nInd = 2),
getVirginQueens(colony, nInd = 2)
)
isCaste(bees, caste = "queen")
isCaste(bees, caste = "fathers")
isCaste(bees, caste = "workers")
isCaste(bees, caste = "drones")
isCaste(bees, caste = "virginQueens")
isQueen(getQueen(colony))
isQueen(getFathers(colony, nInd = 2))
isFather(getQueen(colony))
isFather(getFathers(colony, nInd = 2))
isWorker(getQueen(colony))
isWorker(getFathers(colony, nInd = 2))
isWorker(getWorkers(colony, nInd = 2))
isDrone(getQueen(colony))
isDrone(getFathers(colony, nInd = 2))
isDrone(getDrones(colony, nInd = 2))
isVirginQueen(getQueen(colony))
isVirginQueen(getFathers(colony, nInd = 2))
isVirginQueen(getVirginQueens(colony, nInd = 2))
[Package SIMplyBee version 0.3.0 Index]