Learn R Programming

strataG (version 2.0.2)

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
# NOT RUN {
haps <- simGammaHaps(1000, 15, 1, 2.5)
print(haps)

# }

Run the code above in your browser using DataLab