Statistical Tests and Graphics for Hardy-Weinberg Equilibrium
Overview
Contains tools for exploring Hardy-Weinberg equilibrium (Hardy, 1908; Weinberg, 1908) for bi and multi-allelic genetic marker data. All classical tests (chi-square, exact, likelihood-ratio and permutation tests) with bi-allelic variants are included in the package, as well as functions for power computation and for the simulation of marker data under equilibrium and disequilibrium. Routines for dealing with markers on the X-chromosome are included (Graffelman & Weir, 2016) doi:10.1038/hdy.2016.20, including Bayesian procedures. Some exact and permutation procedures also work with multi-allelic variants. Special test procedures that jointly address Hardy-Weinberg equilibrium and equality of allele frequencies in both sexes are supplied, for the bi and multi-allelic case. Functions for testing equilibrium in the presence of missing data by using multiple imputation are also provided. Implements several graphics for exploring the equilibrium status of a large set of bi-allelic markers: ternary plots with acceptance regions, log-ratio plots and Q-Q plots. The functionality of the package is explained in detail in a related JSS paper doi:10.18637/jss.v064.i03.
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK13 OK2026-05-02
Show 4 earlier changesHide 4 earlier changes
- ERROR11 OK, 1 ERROR2026-04-25
- OK14 OK2026-04-22
- ERROR13 OK, 1 ERROR2026-04-18
- OK14 OK2026-03-10
Documentation
- Help pages
- 87includes a package overview page
- Examples that run
- 99%82 run in a plain check · 1 never run
- Exported functions with examples
- 100%
- Documented parameters
- 97%
- Return-value docs
- 100%
- Help pages citing references
- 62%
Downloads
Dependencies
Installing HardyWeinberg adds 62 packages (36 with compiled code, 42 MB of source tarballs). Heaviest: stringi 11 MB, lme4 4.1 MB, glmnet 2.7 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.7.9Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 1.7.82024-04-06 · diff ↗
- 1.7.72024-03-31 · diff ↗ ·
added 11 exports
afx, he, HWEM, HWLindley.cri, HWStr, HWStrata, is.mono, order.auto, order.x, qqunif, shannon - RR 4.3.0 released · 2023-04-21
- 1.7.52022-05-07 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 1.7.42021-11-26 · diff ↗
- 1.7.32021-11-17 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.92020-12-08 · diff ↗
Show 39 earlier eventsHide 39 earlier events
- 1.6.82020-09-20 · diff ↗
- 1.6.7
- 1.6.6
- RR 4.0.0 released · 2020-04-24
- 1.6.32019-06-29 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 1.6.22019-04-14 · diff ↗
- 1.6.12018-05-30 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 1.5.92017-12-16 · diff ↗ ·
added 13 exports
alleles, dgraffelmanweir.bi, dlevene, dlevene.bi, EAFExact, HWAIC, HWLRtest, HWLRAllTests, HWPerm.mult, HWTriExact, n.alleles, strsort, toTriangular - 1.5.8
- 1.5.7
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- 1.5.62016-03-29 · diff ↗ ·
added 6 exports
AFtest, agcounts, HWChisqStats, HWClo, HWExactPrevious, HWExactStats - RR 3.2.0 released · 2015-04-16
- 1.5.5
- 1.5.4
- RR 3.1.0 released · 2014-04-10
- 1.5.2
- 1.5.12013-11-14 · diff ↗ ·
added 17 exports
fisherz, HWAlltests, HWAlr, HWAlrPlot, HWClr, HWClrPlot, HWf, HWGenotypePlot, HWIlr, HWIlrPlot, HWMissing, HWPower, HWQqplot, ifisherz, mac, MakeCounts, recode - RR 3.0.0 released · 2013-04-03
- RR 2.15.0 released · 2012-03-30
- 1.4.1
- RR 2.14.0 released · 2011-10-31
- RR 2.13.0 released · 2011-04-13
- RR 2.12.0 released · 2010-10-15
- RR 2.11.0 released · 2010-04-22
- 1.42009-11-23 · diff ↗
- RR 2.10.0 released · 2009-10-26
- RR 2.9.0 released · 2009-04-17
- 1.3
- RR 2.8.0 released · 2008-10-20
- 1.2
- RR 2.7.0 released · 2008-04-22
- 1.12007-10-03 · diff ↗
- RR 2.6.0 released · 2007-10-03
- 1.02007-10-02
- RR 2.5.0 released · 2007-04-24
Package metadata
- First published
- 2007-10-02
- Total releases
- 30 / 19 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 1.8.0
- Bundled data
- 150 KB / 14 files
- Download size
- 1.2 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("HardyWeinberg")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v064.i03, 10.1159/000108939, 10.1038/hdy.2016.20.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.