MultiColony-class {SIMplyBee}R Documentation

Honeybee multicolony object

Description

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

Usage

isMultiColony(x)

## S4 method for signature 'MultiColony'
show(object)

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

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

## S4 method for signature 'MultiColony,integerOrNumericOrLogical'
x[i, j, drop]

## S4 method for signature 'MultiColony,character'
x[i, j, drop]

## S4 method for signature 'MultiColony,integerOrNumericOrLogical'
x[[i]]

## S4 method for signature 'MultiColony,character'
x[[i]]

## S4 replacement method for signature 
## 'MultiColony,integerOrNumericOrLogicalOrCharacter,ANY,MultiColony'
x[i, j] <- value

## S4 replacement method for signature 
## '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

Slots

colonies

list, a collection of Colony-class objects

See Also

createMultiColony

Examples

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

drones <- createDrones(x = basePop[1], nInd = 1000)
droneGroups <- pullDroneGroupsFromDCA(drones, n = 10, nDrones = nFathersPoisson)
apiary <- createMultiColony(basePop[1:6], n = 6)
apiary <- cross(apiary, drones = droneGroups[1:6])
apiary
show(apiary)
is(apiary)
isMultiColony(apiary)

getId(apiary)
apiary[1]
getId(apiary[1])
getId(apiary["2"])
getId(apiary[2])
getId(apiary[-1])
getId(apiary[5])

getId(apiary)
getId(apiary[c(1, 3)])
getId(apiary[c("2", "4")])
getId(apiary[c(TRUE, FALSE, TRUE, FALSE)])
getId(apiary[c(TRUE, FALSE)]) # beware of recycling!
getId(apiary[c(5, 6)])
getId(apiary[c("6", "7")])

apiary[[1]]
apiary[["2"]]
apiary[[3]]
apiary[["4"]]
try(apiary[[6]])
apiary[["7"]]

getId(c(apiary[c(1, 3)], apiary[2]))
getId(c(apiary[2], apiary[c(1, 3)]))

getId(c(apiary[2], apiary[0]))
getId(c(apiary[0], apiary[2]))

getId(c(apiary[2], NULL))
getId(c(NULL, apiary[2]))

apiary1 <- apiary[1:2]
apiary2 <- apiary[3:4]
getId(apiary1)
getId(apiary2)
apiary1[[1]] <- apiary2[[1]]
getId(apiary1)
try(apiary2[[1]] <- apiary2[[2]])

apiary1 <- apiary[1:2]
apiary2 <- apiary[3:5]
getId(apiary1)
getId(apiary2)
apiary2[1:2] <- apiary1
getId(apiary2)
try(apiary2[1] <- apiary1)
try(apiary2[1:3] <- apiary1)
try(apiary2[1:2] <- apiary1[[1]])

apiary2 <- apiary[3:5]
getId(apiary2)
try(apiary2[c("4", "5")] <- apiary1)
try(apiary2[c("4", "5")] <- apiary1)

[Package SIMplyBee version 0.3.0 Index]