Learn R Programming

AlphaSimR (version 1.4.2)

mergePops: Merge list of populations

Description

Rapidly merges a list of populations into a single population

Usage

mergePops(popList)

Value

Returns a Pop-class

Arguments

popList

a list containing Pop-class elements or a MegaPop-class

Examples

Run this code
#Create founder haplotypes
founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)

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

#Create a list of populations and merge list
pop = newPop(founderPop, simParam=SP)
popList = list(pop, pop)
pop2 = mergePops(popList)

Run the code above in your browser using DataLab