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

n.alleles

Number of alleles


Description

Function n.alleles determines the number of alleles in a named genotype vector.

Usage

n.alleles(x, ...)

Arguments

x

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

...

extra arguments that are passed on to alleles

Value

integer

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

See Also

Examples

x <- c(AA=25,AB=50,BB=25)
   k <- n.alleles(x)
   print(k)

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.