Learn R Programming

hapsim (version 0.31)

allelefreqs: Estimates allele frequencies

Description

Estimates allele frequencies from a binary matrix

Usage

allelefreqs(dat)

Arguments

dat

A binary matrix, rows are haplotypes and columns are binary markers

Value

A list containing:

freqs

Vector of allele "0" frequencies

all.polym

If TRUE, all loci are polymorphic

non.polym

Vector of non-polymorphic loci, if any

References

Montana, G. HapSim: a simulation tool for generating haplotype data with pre-specified allele frequencies and LD coefficients. 2005.

Examples

Run this code

data(ACEdata)
x <- allelefreqs(ACEdata)
hist(x$freqs)

Run the code above in your browser using DataLab