Learn R Programming

HardyWeinberg (version 1.7.8)

order.x: Reordering of X-chromosomal genotype counts

Description

Function order.x reorders a named vector of three genotype counts, such that the sequence (minor hemizygote, major hemizygote, minor homozygote, heterozygote, major heterzygote) is establised.

Usage

order.x(X)

Value

a vector

Arguments

X

a named vector of genotype counts (e.g. c(A=10,B=10,AA=25,AB=50,BB=25))

Author

Jan Graffelman jan.graffelman@upc.edu

References

Graffelman, J. (2015) Exploring Diallelic Genetic Markers: The HardyWeinberg Package. Journal of Statistical Software 64(3): 1-23. tools:::Rd_expr_doi("10.18637/jss.v064.i03").

See Also

order.auto

Examples

Run this code
x <-  c(A=392, B=212, AA=275, AB=296, BB=80)
print(x)
y <- order.x(x)
print(y)

Run the code above in your browser using DataLab