Learn R Programming

HWxtest (version 1.1.9)

xcount: Find Exact Number of Genotype Tables

Description

Use xcount to determine the exact number of tables (i.e., genotype numbers) for a given set of allele counts. This method enumerates all tables, and is best when the total number is less than 10^10 or so. This function is mostly called by hwx.test rather than directly by the user. If the number of tables is too large to enumerate with this method, use acount for an approximation.

Usage

xcount(m, safety = 1e+10, safeSecs = 10)

Arguments

m

vector containing the numbers of alleles of each type. Length must be at least 2 and all must be non-negative integers. It can also be a matrix of genotype counts.

safety

Stop execution if the approximate table number obtained from acount is more than this cutoff.

safeSecs

Time limit in seconds. Another safety feature to prevent getting stuck in a too-long computation

Value

The exact number of tables

References

The methods are described by Engels, 2009. Genetics 183:1431.

See Also

hwx.test, acount

Examples

Run this code
# NOT RUN {
# Allele counts from human Rh locus. Guo and Thompson, 1992, Figure 1
#
alleles <- c(15, 14, 11, 12, 2, 2, 1, 3)
xcount(alleles)

# }

Run the code above in your browser using DataLab