newPop: Create new population

View source: R/Class-Pop.R

newPopR 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)


AlphaSimR documentation built on Nov. 2, 2023, 6:01 p.m.