Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sampleHaplo

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)

AlphaSimR

Breeding Program Simulations

v0.13.0
MIT + file LICENSE
Authors
Chris Gaynor [aut, cre] (<https://orcid.org/0000-0003-0558-6656>), Gregor Gorjanc [aut] (<https://orcid.org/0000-0001-8008-2787>), John Hickey [aut] (<https://orcid.org/0000-0001-5675-3974>), Daniel Money [ctb] (<https://orcid.org/0000-0001-5151-3648>), David Wilson [ctb]
Initial release
2020-10-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.