Learn R Programming

SIMplyBee (version 0.4.1)

createColony: Create a new Colony

Description

Level 2 function that creates a new Colony-class to initiate simulations.

Usage

createColony(x = NULL, simParamBee = NULL)

Value

new Colony-class

Arguments

x

Pop-class, one queen or virgin queen(s)

simParamBee

SimParamBee, global simulation parameters

Examples

Run this code
founderGenomes <- quickHaplo(nInd = 5, nChr = 1, segSites = 50)
SP <- SimParamBee$new(founderGenomes)
SP$nThreads = 1L
basePop <- createVirginQueens(founderGenomes)
drones <- createDrones(x = basePop[1], nInd = 15)

# Create an empty Colony class
colony <- createColony()

# Create Colony class with one or multiple virgin queens
colony1 <- createColony(x = basePop[2])
colony1
colony2 <- createColony(x = basePop[3:4])
colony2

# Create a mated Colony
colony1 <- cross(colony1, drones = drones)
colony1

Run the code above in your browser using DataLab