R/chooseAllelesChar.R
chooseAllelesChar.Rd
Combines two vectors by randomly selecting one allele
or the other at each position. Alleles may be of any class that
does not require attributes as the vectors are combined with c()
.
chooseAllelesChar(a1, a2)
a1 | vector with first parent alleles for each individual |
---|---|
a2 | vector with second parent alleles for each individual
|
An integer vector with the result of sampling from a1
and a2
according to Mendelian inheritance.
The current implementation is slower than the one using integer vectors
(chooseAlleles
).