Genetic Analysis Package
Overview
As first reported [Zhao, J. H. 2007. "gap: Genetic Analysis Package". J Stat Soft 23(8):1-18. doi:10.18637/jss.v023.i08], it is designed as an integrated package for genetic data analysis of both population and family data. Currently, it contains functions for sample size calculations of both population-based and family-based designs, probability of familial disease aggregation, kinship calculation, statistics in linkage analysis, and association analysis involving genetic markers including haplotype analysis with or without environmental covariates. Over years, the package has been developed in-between many projects hence also in line with the name (gap).
Install
Health
NOTEdependencies in R coder-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Base package in Suggests/Enhances imported in NAMESPACE: ‘grDevices’
r-devel-windows-x86_64
Base package in Suggests/Enhances imported in NAMESPACE: 'grDevices'
- NOTE8 OK, 5 NOTENow
- NOTE11 OK, 2 NOTE2026-09-11
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-27
- ERROR12 OK, 1 ERROR2026-06-23
Show 5 earlier changesHide 5 earlier changes
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK13 OK2026-05-31
- WARNING12 OK, 1 WARNING2026-05-13
- OK14 OK2026-03-10
Documentation
- Help pages
- 118 (1 internal)includes a package overview page
- Examples that run
- 19%18 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran) · 76 never run
- Exported functions with examples
- 84%
- Documented parameters
- 100%
- Return-value docs
- 90%
- Help pages citing references
- 43% with a bibliography file
Also includes 1 demo script (run with demo())
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 0
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
Issues over time
PRs over time
Commits over time
4 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/jinghuazhao/r on 2026-10-11.
The R CMD check workflow runs on macOS
GitHub Pages site last deployed 2026-09-29 · The repository has a site deploy workflow
Dependencies
Installing gap adds 67 packages (36 with compiled code, 67 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
Datasets
People & History
Maintainer since 0.3 (2004)
Show 6 peopleHide 6 people
Pick two releases to compare their code metrics.
- 1.15.2Latest
- 1.15.1
- RR 4.6.0 released · 2026-04-24
- 1.142026-02-19 · diff ↗
- 1.92026-02-06 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 1.6
- RR 4.4.0 released · 2024-04-24
- 1.5-3
- RR 4.3.0 released · 2023-04-21
- 1.5-12023-01-22 · diff ↗ ·
added 8 exports
ReadGRM, ReadGRMBin, WriteGRM, WriteGRMBin, a2g, allele.recode, g2a, geno.recode - 1.52023-01-13 · diff ↗
- 1.4-2
- 1.3-12022-10-21 · diff ↗ ·
removed 66 exports
allele.recode, allDuplicated, a2g, Cox.est, Cox.T, cov.invlogit, DevH0dominant, DevH0dominant.est, DevH0recessive, DevH0recessive.est, DevHaGdominant, DevHaGdominant.est, DevHaGrecessive, DevHaGrecessive.est, g2a, g2a.c, gc.control, gcode, geno.recode, getPTE, getb1star, grec2g, hap.control, htr, HapDesign, HapFreqSE, invlogit, KCC, k, lambda1000 and 36 moreadded 9 exports
circos.mhtplot2, labelManhattan, miamiplot2, mr_forestplot, pedtodot_verbatim, qtl2dplot, qtl2dplotly, qtl3dplotly, qtlClassifier - 1.2.3-62022-05-14 · diff ↗ ·
removed 3 exports
h2, mhtplot2d, mhtplot3dadded 14 exports
allDuplicated, get_b_se, get_pve_se, get_sdy, grid2d, h2_mzdz, ixy, pqtl2dplot, pqtl2dplotly, pqtl3dplotly, revStrand, runshinygap, textbox, xy - RR 4.2.0 released · 2022-04-22
Show 71 earlier eventsHide 71 earlier events
- RR 4.1.0 released · 2021-05-18
- 1.2.3-1
- RR 4.0.0 released · 2020-04-24
- 1.2.22020-02-02 · diff ↗ ·
added 8 exports
chr_pos_a1_a2, cs, inv_chr_pos_a1_a2, lambda1000, logp, makeRLEplot, mhtplot2d, snptest_sample - 1.2.12019-06-05 · diff ↗ ·
added 14 exports
cis.vs.trans.classification, circos.cis.vs.trans.plot, circos.cnvplot, circos.mhtplot, cnvplot, gc.lambda, h2.jags, hwe.jags, invnormal, log10p, METAL_forestplot, mhtplot.trunc, miamiplot, sentinels - RR 3.6.0 released · 2019-04-26
- 1.1-222018-06-08 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 1.1-212018-01-24 · diff ↗
- 1.1-202017-11-25 · diff ↗
- RR 3.4.0 released · 2017-04-21
- 1.1-172017-04-19 · diff ↗
- RR 3.3.0 released · 2016-05-03
- 1.1-162015-06-06 · diff ↗
- 1.1-142015-06-04 · diff ↗
- 1.1-13
- RR 3.2.0 released · 2015-04-16
- 1.1-122014-08-18 · diff ↗ ·
added 7 exports
h2G, ReadGRM, ReadGRMPLINK, ReadGRMPCA, WriteGRM, WriteGRMBin, WriteGRMSAS - RR 3.1.0 released · 2014-04-10
- 1.1-10
- 1.1-92013-04-08 · diff ↗
- RR 3.0.0 released · 2013-04-03
- 1.1-82013-02-26 · diff ↗ ·
removed 1 export
twinan90added 4 exports
AE3, allele.recode, geno.recode, mhtplot2 - RR 2.15.0 released · 2012-03-30
- 1.1-62012-03-15 · diff ↗ ·
removed 10 exports
ci, Dev, Dev.est, DevHa.recessive, DevHa.recessive.est, ExpN.recessiveH0, ExpN.recessiveHa, geno.p, hw, twinan90added 2 exports
allele.recode, geno.recode - 1.1-32011-12-06 · diff ↗ ·
removed 9 exports
ci, Dev, Dev.est, DevHa.recessive, DevHa.recessive.est, ExpN.recessiveH0, ExpN.recessiveHa, geno.p, hw - RR 2.14.0 released · 2011-10-31
- 1.1-22011-05-03 · diff ↗ ·
removed 2 exports
allele.recode, geno.recodeadded 10 exports
ci, Dev, Dev.est, DevHa.recessive, DevHa.recessive.est, ExpN.recessiveH0, ExpN.recessiveHa, geno.p, hw, twinan90 - RR 2.13.0 released · 2011-04-13
- 1.1-12010-12-10 · diff ↗
- 1.1-0
- RR 2.12.0 released · 2010-10-15
- 1.0-232010-06-25 · diff ↗ ·
removed 1 export
abcadded 35 exports
ab, Cox.est, Cox.T, ci, cov.invlogit, Dev, Dev.est, DevH0dominant, DevH0dominant.est, DevH0recessive, DevH0recessive.est, DevHaGdominant, DevHaGdominant.est, DevHaGrecessive, DevHaGrecessive.est, DevHa.recessive, DevHa.recessive.est, ExpN.recessiveH0, ExpN.recessiveHa, geno.p, getPTE, getb1star, h2, hw, hwe.cc, invlogit, k, klem, logit, masize and 5 more - RR 2.11.0 released · 2010-04-22
- 1.0-22
- 1.0-21
- RR 2.10.0 released · 2009-10-26
- 1.0-20
- RR 2.9.0 released · 2009-04-17
- 1.0-17
- RR 2.8.0 released · 2008-10-20
- RR 2.7.0 released · 2008-04-22
- 1.0-152008-04-10 · diff ↗ ·
removed 2 exports
kbyl, tbytadded 13 exports
asplot, ESplot, gcontrol2, LD22, LDkl, metap, metareg, mhtplot, PARn, qqfun, snp.ES, snp.HWE, snp.PAR - 1.0-14
- RR 2.6.0 released · 2007-10-03
- 1.0-132007-10-02 · diff ↗
- 1.0-122007-07-31 · diff ↗ ·
removed 6 exports
Ginv, allele.recode, compositeLD, geno.recode, printBanner, print.compositeLDadded 3 exports
BFDP, FPRP, qqunif - 1.0-11
- RR 2.5.0 released · 2007-04-24
- 1.0-10
- RR 2.4.0 released · 2006-10-03
- 1.0-9
- RR 2.3.0 released · 2006-04-24
- 1.0-8
- 1.0-62006-02-13 · diff ↗ ·
added 50 exports
Ginv, a2g, allele.recode, bt, ccsize, chow.test, compositeLD, fbsize, g2a, g2a.c, gc.control, gc.em, gcode, gcontrol, gcp, genecounting, geno.recode, gif, grec2g, hap, hap.control, hap.em, hap.score, htr, hwe, hwe.hardy, kbyl, kin.morgan, m2plem, makeped and 20 more - 1.0-52006-01-17 · diff ↗ ·
added 50 exports
Ginv, a2g, allele.recode, bt, ccsize, chow.test, compositeLD, fbsize, g2a, g2a.c, gc.control, gc.em, gcode, gcontrol, gcp, genecounting, geno.recode, gif, grec2g, hap, hap.control, hap.em, hap.score, htr, hwe, hwe.hardy, kbyl, kin.morgan, m2plem, makeped and 20 more - RR 2.2.0 released · 2005-10-06
- 1.0-32005-07-24 · diff ↗
- RR 2.1.0 released · 2005-04-18
- 1.0-22005-04-15 · diff ↗
- 1.0-12005-04-10 · diff ↗ ·
removed 50 exports
Ginv, a2g, allele.recode, bt, ccsize, chow.test, compositeLD, fbsize, g2a, g2a.c, gc.control, gc.em, gcode, gcontrol, gcp, genecounting, geno.recode, gif, grec2g, hap, hap.control, hap.em, hap.score, htr, hwe, hwe.hardy, kbyl, kin.morgan, m2plem, makeped and 20 more - 0.8-32004-12-21 · diff ↗
- RR 2.0.0 released · 2004-10-04
- 0.8-22004-08-17 · diff ↗
- RR 1.9.0 released · 2004-04-12
- 0.82004-02-29 · diff ↗
- 0.72004-02-02 · diff ↗
- 0.52004-01-22 · diff ↗
- 0.42004-01-18 · diff ↗
- 0.32004-01-14
- RR 1.8.0 released · 2003-10-08
Package metadata
- First published
- 2004-01-14
- Total releases
- 55 / 22 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 2.10
- Bundled data
- 0.6 KB / 4 files
- Download size
- 808 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("gap")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.