newPop {AlphaSimR}R Documentation

Create new population

Description

Creates an initial Pop-class from an object of MapPop-class or NamedMapPop-class. The function is intended for us with output from functions such as runMacs, newMapPop, or quickHaplo.

Usage

newPop(rawPop, simParam = NULL, ...)

Arguments

rawPop

an object of MapPop-class or NamedMapPop-class

simParam

an object of SimParam

...

additional arguments used internally

Value

Returns an object of Pop-class

Examples

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

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

#Create population
pop = newPop(founderPop, simParam=SP)
isPop(pop)


[Package AlphaSimR version 1.5.3 Index]