Skip to contents

Creates an empty Pop-class object with user defined ploidy and other parameters taken from simParam.

Usage

newEmptyPop(ploidy = 2L, simParam = NULL)

Arguments

ploidy

the ploidy of the population

simParam

an object of class SimParam. If NULL, the function uses the object named SP from the global environment.

Value

Returns an object of Pop-class with zero individuals

Examples

#Create founder haplotypes
founderPop = quickHaplo(nInd=2, nChr=1, segSites=10)

#Set simulation parameters
SP = SimParam$new(founderPop)
SP$addTraitA(10)

#Create empty population
pop = newEmptyPop(simParam=SP)
isPop(pop)
#> [1] TRUE