R/Functions_L0_auxilary.R
nCaste.Rd
Returns the number of individuals of a caste in a colony
nCaste(x, caste = "all", simParamBee = NULL)
nQueens(x, simParamBee = NULL)
nFathers(x, simParamBee = NULL)
nWorkers(x, simParamBee = NULL)
nDrones(x, simParamBee = NULL)
nVirginQueens(x, simParamBee = NULL)
character, "queen", "fathers", "workers", "drones", "virginQueens", or "all"
SimParamBee
, global simulation parameters
when x
is Colony-class
return is integer for
caste != "all"
or list for caste == "all"
with nodes named
by caste; when x
is MultiColony-class
return is named
integer for caste != "all"
or named list of lists for
caste == "all"
nQueens()
: Number of queens in a colony
nFathers()
: Number of fathers in a colony
nWorkers()
: Number of workers in a colony
nDrones()
: Number of drones in a colony
nVirginQueens()
: Number of virgin queens in a colony
nQueens
, nFathers
,
nVirginQueens
, nWorkers
, and
nDrones
founderGenomes <- quickHaplo(nInd = 8, nChr = 1, segSites = 100)
SP <- SimParamBee$new(founderGenomes)
SP$nThreads = 1L
basePop <- createVirginQueens(founderGenomes)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
drones <- createDrones(x = basePop[1], nInd = 1000)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
droneGroups <- pullDroneGroupsFromDCA(drones, n = 10, nDrones = nFathersPoisson)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Create a Colony and a MultiColony class
colony <- createColony(x = basePop[2])
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
colony <- cross(colony, drones = droneGroups[[1]])
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
colony <- buildUp(x = colony, nWorkers = 100, nDrones = 10)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
colony <- addVirginQueens(x = colony, nInd = 3)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
apiary <- createMultiColony(basePop[3:4], n = 2)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
apiary <- cross(apiary, drones = droneGroups[c(2, 3)])
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
apiary <- buildUp(x = apiary, nWorkers = 100, nDrones = 10)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
apiary <- addVirginQueens(x = apiary, nInd = 3)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Check caste members
nCaste(colony, caste = "queen")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nCaste(colony, caste = "fathers")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nCaste(colony, caste = "virginQueens")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nCaste(colony, caste = "workers")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nCaste(colony, caste = "drones")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nCaste(colony, caste = "all")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nCaste(apiary, caste = "queen")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nCaste(apiary, caste = "fathers")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nCaste(apiary, caste = "virginQueens")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nCaste(apiary, caste = "workers")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nCaste(apiary, caste = "drones")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nCaste(apiary, caste = "all")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Check number of queens
nQueens(colony)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nQueens(apiary)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
apiary <- removeQueen(apiary)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nQueens(apiary)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Check number of fathers
nFathers(colony)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nFathers(apiary)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Check number of workers
nWorkers(colony)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nWorkers(apiary)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Check number of drones
nDrones(colony)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nDrones(apiary)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Check number of virgin queens
nVirginQueens(colony)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nVirginQueens(apiary)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found