Learn R Programming

AlphaSimR (version 1.6.0)

newMultiPop: Create new Multi Population

Description

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

Usage

newMultiPop(...)

Value

Returns an object of MultiPop-class

Arguments

...

one or more Pop-class and/or MultiPop-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 = newMultiPop(pop=pop)
isMultiPop(megaPop)

Run the code above in your browser using DataLab