Level 0 function that returns the number of colonies in a MultiColony object.

nColonies(multicolony)

nNULLColonies(multicolony)

nEmptyColonies(multicolony)

Arguments

multicolony

MultiColony-class

Value

integer

Functions

  • nNULLColonies(): Number of NULL colonies in a MultiColony object

  • nEmptyColonies(): Number of empty colonies in a MultiColony object

See also

nNULLColonies and nEmptyColonies

Examples

founderGenomes <- quickHaplo(nInd = 5, 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
emptyApiary <- createMultiColony(n = 3)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
emptyApiary1 <- c(createColony(), createColony())
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nonEmptyApiary <- createMultiColony(basePop[2:3], n = 2)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found

nColonies(nonEmptyApiary)
#> Error in eval(expr, envir, enclos): object 'nonEmptyApiary' not found
nColonies(emptyApiary)
#> Error in eval(expr, envir, enclos): object 'emptyApiary' not found

isEmpty(emptyApiary)
#> Error in eval(expr, envir, enclos): object 'emptyApiary' not found
isEmpty(emptyApiary1)
#> Error in eval(expr, envir, enclos): object 'emptyApiary1' not found
isEmpty(nonEmptyApiary)
#> Error in eval(expr, envir, enclos): object 'nonEmptyApiary' not found
isNULLColonies(emptyApiary)
#> Error in eval(expr, envir, enclos): object 'emptyApiary' not found
isNULLColonies(emptyApiary1)
#> Error in eval(expr, envir, enclos): object 'emptyApiary1' not found
isNULLColonies(nonEmptyApiary)
#> Error in eval(expr, envir, enclos): object 'nonEmptyApiary' not found

nEmptyColonies(emptyApiary)
#> Error in eval(expr, envir, enclos): object 'emptyApiary' not found
nEmptyColonies(emptyApiary1)
#> Error in eval(expr, envir, enclos): object 'emptyApiary1' not found
nEmptyColonies(nonEmptyApiary)
#> Error in eval(expr, envir, enclos): object 'nonEmptyApiary' not found
nNULLColonies(emptyApiary)
#> Error in eval(expr, envir, enclos): object 'emptyApiary' not found
nNULLColonies(emptyApiary1)
#> Error in eval(expr, envir, enclos): object 'emptyApiary1' not found
nNULLColonies(nonEmptyApiary)
#> Error in eval(expr, envir, enclos): object 'nonEmptyApiary' not found