sampleHaplo {AlphaSimR} | R Documentation |
Creates a new MapPop-class
from an existing
MapPop-class
by randomly sampling haplotypes.
sampleHaplo(mapPop, nInd, inbred = FALSE, ploidy = NULL, replace = TRUE)
mapPop |
the |
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 |
an object of MapPop-class
founderPop = quickHaplo(nInd=2,nChr=1,segSites=11,inbred=TRUE) founderPop = sampleHaplo(nInd=20,mapPop=founderPop)