allele.recode {haplo.stats}R Documentation

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.

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.

Value

List with components:

a1 Vector of recoded "first" alleles.
a2 Recode of recoded "second" alleles.
allele.label Vector of labels for unique alleles.

Side Effects

References

See Also

geno.recode

Examples



[Package haplo.stats version 1.2.2 Index]