Level 0 function that returns the number of colonies in a MultiColony object.
nColonies(multicolony)
nNULLColonies(multicolony)
nEmptyColonies(multicolony)
integer
nNULLColonies()
: Number of NULL
colonies in a MultiColony object
nEmptyColonies()
: Number of empty colonies in a MultiColony object
nNULLColonies
and nEmptyColonies
founderGenomes <- quickHaplo(nInd = 5, nChr = 1, segSites = 100)
SP <- SimParamBee$new(founderGenomes)
basePop <- createVirginQueens(founderGenomes)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
emptyApiary <- createMultiColony(n = 3)
emptyApiary1 <- c(createColony(), createColony())
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
nonEmptyApiary <- createMultiColony(basePop[2:3], n = 2)
#> Error in createMultiColony(basePop[2:3], n = 2): object 'basePop' not found
nColonies(nonEmptyApiary)
#> Error in "MultiColony" %in% class(multicolony): object 'nonEmptyApiary' not found
nColonies(emptyApiary)
#> [1] 3
isEmpty(emptyApiary)
#> <NA> <NA> <NA>
#> TRUE TRUE TRUE
isEmpty(emptyApiary1)
#> Error in isEmpty(emptyApiary1): object 'emptyApiary1' not found
isEmpty(nonEmptyApiary)
#> Error in isEmpty(nonEmptyApiary): object 'nonEmptyApiary' not found
isNULLColonies(emptyApiary)
#> <NA> <NA> <NA>
#> TRUE TRUE TRUE
isNULLColonies(emptyApiary1)
#> Error in is(x, class2 = "MultiColony"): object 'emptyApiary1' not found
isNULLColonies(nonEmptyApiary)
#> Error in is(x, class2 = "MultiColony"): object 'nonEmptyApiary' not found
nEmptyColonies(emptyApiary)
#> [1] 3
nEmptyColonies(emptyApiary1)
#> Error in "MultiColony" %in% class(multicolony): object 'emptyApiary1' not found
nEmptyColonies(nonEmptyApiary)
#> Error in "MultiColony" %in% class(multicolony): object 'nonEmptyApiary' not found
nNULLColonies(emptyApiary)
#> [1] 3
nNULLColonies(emptyApiary1)
#> Error in "MultiColony" %in% class(multicolony): object 'emptyApiary1' not found
nNULLColonies(nonEmptyApiary)
#> Error in "MultiColony" %in% class(multicolony): object 'nonEmptyApiary' not found