Learn R Programming

AlphaSimR (version 1.4.2)

newMegaPop: Create new Mega Population

Description

Creates a new MegaPop-class from one or more Pop-class and/or MegaPop-class objects.

Usage

newMegaPop(...)

Value

Returns an object of MegaPop-class

Arguments

...

one or more Pop-class and/or MegaPop-class objects.

Examples

Run this code
#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)
megaPop = newMegaPop(pop=pop)
isMegaPop(megaPop)

Run the code above in your browser using DataLab