allele.recode {haplo.score} | R Documentation |
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.
allele.recode(a1, a2, miss.val=NA)
a1 |
Vector of "first" alleles. |
a2 |
Vector of "second" alleles. |
miss.val |
Vector of missing value codes for alleles. |
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.
List with components:
a1 |
Vector of recoded "first" alleles. |
a2 |
Recode of recoded "second" alleles. |
allele.label |
Vector of labels for unique alleles. |
geno.recode