isEmpty {SIMplyBee}R Documentation

Check whether a population, colony or a multicolony object has no individuals within

Description

Check whether a population, colony or a multicolony object has no individuals within.

Usage

isEmpty(x)

Arguments

x

Pop-class or Colony-class or MultiColony-class

Value

boolean when x is Pop-class or Colony-class, and named vector of boolean when x is MultiColony-class

Examples

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

isEmpty(new(Class = "Pop"))
isEmpty(basePop[0])
isEmpty(basePop)

emptyColony <- createColony()
nonEmptyColony <- createColony(basePop[1])
isEmpty(emptyColony)
isEmpty(nonEmptyColony)

emptyApiary <- createMultiColony(n = 3)
emptyApiary1 <- c(createColony(), createColony())
emptyApiary2 <- createMultiColony()
nonEmptyApiary <- createMultiColony(basePop[2:5], n = 4)

isEmpty(emptyApiary)
isEmpty(emptyApiary1)
isEmpty(nonEmptyApiary)
isNULLColonies(emptyApiary)
isNULLColonies(emptyApiary1)
isNULLColonies(nonEmptyApiary)

nEmptyColonies(emptyApiary)
nEmptyColonies(emptyApiary1)
nEmptyColonies(nonEmptyApiary)
nNULLColonies(emptyApiary)
nNULLColonies(emptyApiary1)
nNULLColonies(nonEmptyApiary)


[Package SIMplyBee version 0.3.0 Index]