Learn R Programming

strataG (version 1.0.5)

simGammaHaps: Simulate Haplotypes

Description

Simulate a haplotypic frequency distribution based on a specified gamma distribution.

Usage

simGammaHaps(pop.size, num.haps, shape, scale, return.freq = TRUE, plot = TRUE)

Arguments

pop.size
size of population.
num.haps
number of haplotypes to generate.
shape, scale
parameters of Gamma distribution (see dgamma).
return.freq
logical. Return frequency table of haplotypes? If FALSE return vector of haplotypes.
plot
logical. Show plot of haplotypic frequency distribution?

Value

Frequency table of haplotypes.

Examples

Run this code
haps <- simGammaHaps(1000, 15, 1, 2.5)
print(haps)

Run the code above in your browser using DataLab