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

createColony(x = NULL, simParamBee = NULL)

Arguments

x

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

simParamBee

SimParamBee, global simulation parameters

Value

new Colony-class

Examples

founderGenomes <- quickHaplo(nInd = 5, nChr = 1, segSites = 50)
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 = 15)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found

# Create an empty Colony class
colony <- createColony()
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found

# Create Colony class with one or multiple virgin queens
colony1 <- createColony(x = basePop[2])
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
colony1
#> Error in eval(expr, envir, enclos): object 'colony1' not found
colony2 <- createColony(x = basePop[3:4])
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
colony2
#> Error in eval(expr, envir, enclos): object 'colony2' not found

# Create a mated Colony
colony1 <- cross(colony1, drones = drones)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
colony1
#> Error in eval(expr, envir, enclos): object 'colony1' not found