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)
vector with first parent alleles for each individual
vector with second parent alleles for each individual
a1
and a2
are equal length vectors of alleles for one
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
).