sampleHaplo {AlphaSimR}R Documentation

Sample haplotypes from a MapPop

Description

Creates a new MapPop-class from an existing MapPop-class by randomly sampling haplotypes.

Usage

sampleHaplo(mapPop, nInd, inbred = FALSE, ploidy = NULL, replace = TRUE)

Arguments

mapPop

the MapPop-class used to sample haplotypes

nInd

the number of individuals to create

inbred

should new individuals be fully inbred

ploidy

new ploidy level for organism. If NULL, the ploidy level of the mapPop is used.

replace

should haplotypes be sampled with replacement

Value

an object of MapPop-class

Examples

founderPop = quickHaplo(nInd=2,nChr=2,segSites=11,inbred=TRUE)
founderPop = sampleHaplo(mapPop=founderPop,nInd=20)


[Package AlphaSimR version 1.3.2 Index]