Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

alleles

Extract alleles


Description

Function alleles extracts the names of the alleles from a named genotype vector.

Usage

alleles(x, fromlabels = TRUE)

Arguments

x

A named or unnamed genotype vector (e.g. c(AA=10,AB=20,BB=5))

fromlabels

extract genotypes from the labels of the vector elements, or from the vector elements themselves.

Value

A character vector with the alleles

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

See Also

Examples

x <- c(AA=10,AG=10,GG=10,AT=5)
   als.x <- alleles(x)

HardyWeinberg

Statistical Tests and Graphics for Hardy-Weinberg Equilibrium

v1.7.2
GPL (>= 2)
Authors
Jan Graffelman [aut, cre], Christopher Chang [ctb], Xavi Puig [ctb], Jan Wigginton [ctb], Leonardo Ortoleva [ctb], William R. Engels [ctb]
Initial release
2021-04-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.