Learn R Programming

AlphaSimR (version 1.2)

newPop: 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
simParam

an object of SimParam

...

additional arguments used internally

Value

Returns an object of Pop-class

Examples

Run this code
# NOT RUN {
#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)

# }

Run the code above in your browser using DataLab