An object holding a collection of honeybee colonies. It behaves like a list.

isMultiColony(x)

# S4 method for MultiColony
show(object)

# S4 method for MultiColony
c(x, ...)

# S4 method for MultiColonyOrNULL
c(x, ...)

# S4 method for MultiColony,integerOrNumericOrLogical
[(x, i, j, drop)

# S4 method for MultiColony,character
[(x, i, j, drop)

# S4 method for MultiColony,integerOrNumericOrLogical
[[(x, i)

# S4 method for MultiColony,character
[[(x, i)

# S4 method for MultiColony,integerOrNumericOrLogicalOrCharacter,ANY,MultiColony
[(x, i, j) <- value

# S4 method for MultiColony,integerOrNumericOrLogicalOrCharacter,ANY,Colony
[[(x, i, j) <- value

Arguments

x

MultiColony-class

object

MultiColony-class

...

NULL, Colony-class, or MultiColony-class

i

integer, numeric, logical, or character, index or ID to select a colony (see examples)

j

not used

drop

not used

value

Colony-class or MultiColony-class to assign into x based on colony index or name i

Value

MultiColony-class or Colony-class

Functions

  • isMultiColony(): Test if x is a MultiColony class object

  • show(MultiColony): Show MultiColony object

  • c(MultiColony): Combine multiple Colony and MultiColony objects

  • c(MultiColonyOrNULL): Combine multiple Colony and MultiColony objects

  • x[i: Extract a colony (one or more!) with an integer/numeric/logical index (position) (return MultiColony-class)

  • x[i: Extract a colony (one or more!) with a character ID (name) (return MultiColony-class)

  • x[[i: Extract a colony (just one!) with an integer/numeric/logical index (position) (return Colony-class)

  • x[[i: Extract a colony (just one!) with a character ID (name) (return Colony-class)

  • `[`(x = MultiColony, i = integerOrNumericOrLogicalOrCharacter, j = ANY) <- value: Assign colonies into MultiColony

  • `[[`(x = MultiColony, i = integerOrNumericOrLogicalOrCharacter, j = ANY) <- value: Assign Colony into MultiColony

Slots

colonies

list, a collection of Colony-class objects

Examples

founderGenomes <- quickHaplo(nInd = 10, 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
apiary <- createMultiColony(basePop[1:6], n = 6)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
apiary <- cross(apiary, drones = droneGroups[1:6])
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
apiary
#> Error in eval(expr, envir, enclos): object 'apiary' not found
show(apiary)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'show': object 'apiary' not found
is(apiary)
#> Error in eval(expr, envir, enclos): object 'apiary' not found
isMultiColony(apiary)
#> Error in eval(expr, envir, enclos): object 'apiary' not found

getId(apiary)
#> Error in eval(expr, envir, enclos): object 'apiary' not found
apiary[1]
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary[1])
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary["2"])
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary[2])
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary[-1])
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary[5])
#> Error in eval(expr, envir, enclos): object 'apiary' not found

getId(apiary)
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary[c(1, 3)])
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary[c("2", "4")])
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary[c(TRUE, FALSE, TRUE, FALSE)])
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary[c(TRUE, FALSE)]) # beware of recycling!
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary[c(5, 6)])
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary[c("6", "7")])
#> Error in eval(expr, envir, enclos): object 'apiary' not found

apiary[[1]]
#> Error in eval(expr, envir, enclos): object 'apiary' not found
apiary[["2"]]
#> Error in eval(expr, envir, enclos): object 'apiary' not found
apiary[[3]]
#> Error in eval(expr, envir, enclos): object 'apiary' not found
apiary[["4"]]
#> Error in eval(expr, envir, enclos): object 'apiary' not found
try(apiary[[6]])
#> Error in eval(expr, envir, enclos) : object 'apiary' not found
apiary[["7"]]
#> Error in eval(expr, envir, enclos): object 'apiary' not found

getId(c(apiary[c(1, 3)], apiary[2]))
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(c(apiary[2], apiary[c(1, 3)]))
#> Error in eval(expr, envir, enclos): object 'apiary' not found

getId(c(apiary[2], apiary[0]))
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(c(apiary[0], apiary[2]))
#> Error in eval(expr, envir, enclos): object 'apiary' not found

getId(c(apiary[2], NULL))
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(c(NULL, apiary[2]))
#> Error in eval(expr, envir, enclos): object 'apiary' not found

apiary1 <- apiary[1:2]
#> Error in eval(expr, envir, enclos): object 'apiary' not found
apiary2 <- apiary[3:4]
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary1)
#> Error in eval(expr, envir, enclos): object 'apiary1' not found
getId(apiary2)
#> Error in eval(expr, envir, enclos): object 'apiary2' not found
apiary1[[1]] <- apiary2[[1]]
#> Error in eval(expr, envir, enclos): object 'apiary2' not found
getId(apiary1)
#> Error in eval(expr, envir, enclos): object 'apiary1' not found
try(apiary2[[1]] <- apiary2[[2]])
#> Error in eval(expr, envir, enclos) : object 'apiary2' not found

apiary1 <- apiary[1:2]
#> Error in eval(expr, envir, enclos): object 'apiary' not found
apiary2 <- apiary[3:5]
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary1)
#> Error in eval(expr, envir, enclos): object 'apiary1' not found
getId(apiary2)
#> Error in eval(expr, envir, enclos): object 'apiary2' not found
apiary2[1:2] <- apiary1
#> Error in eval(expr, envir, enclos): object 'apiary1' not found
getId(apiary2)
#> Error in eval(expr, envir, enclos): object 'apiary2' not found
try(apiary2[1] <- apiary1)
#> Error in eval(expr, envir, enclos) : object 'apiary1' not found
try(apiary2[1:3] <- apiary1)
#> Error in eval(expr, envir, enclos) : object 'apiary1' not found
try(apiary2[1:2] <- apiary1[[1]])
#> Error in eval(expr, envir, enclos) : object 'apiary1' not found

apiary2 <- apiary[3:5]
#> Error in eval(expr, envir, enclos): object 'apiary' not found
getId(apiary2)
#> Error in eval(expr, envir, enclos): object 'apiary2' not found
try(apiary2[c("4", "5")] <- apiary1)
#> Error in eval(expr, envir, enclos) : object 'apiary1' not found
try(apiary2[c("4", "5")] <- apiary1)
#> Error in eval(expr, envir, enclos) : object 'apiary1' not found