allele.recode: Recode allele values to integer ranks
Description
Genotypes for subjects represented by a pair of vectors,
with the vectors containing allele values (either numeric,
factor, or character), are recoded to the rank order of
allele values.
Usage
allele.recode(a1, a2, miss.val=NA)
Arguments
a1
Vector of "first" alleles.
a2
Vector of "second" alleles.
miss.val
Vector of missing value codes for alleles.
Value
List with components:
a1Vector of recoded "first" alleles.
a2Recode of recoded "second" alleles.
allele.labelVector of labels for unique alleles.
Details
If alleles are numeric, they are recoded to the rank order
of the alleles. If the alleles are factor or character,
they are recoded to interger values that correspond to the
indices of the sorted values of the unique alleles, but
sorted as character values.