newEmptyPop: Creates an empty population

View source: R/Class-Pop.R

newEmptyPopR Documentation

Creates an empty population

Description

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 SimParam

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)


AlphaSimR documentation built on Nov. 2, 2023, 6:01 p.m.