Learn R Programming

DNAtools (version 0.2-4)

simAlleleFreqs: Simulate Allele Frequencies

Description

Simulate some allele frequencies using Dirichlet Random variables

Usage

simAlleleFreqs(
  nLoci = 10,
  allelesPerLocus = rep(10, nLoci),
  shape = rep(3, nLoci)
)

Arguments

nLoci

\(L\) the number of loci in the multiplex

allelesPerLocus

the number of alleles per locus

shape

the shape parameter

Value

a list with elements locus.\(l\) where \(l=1,\ldots,L\), each of which are vectors of length allelesPerLocus[l], consisting of allele frequencies for that locus

Examples

Run this code
# NOT RUN {
set.seed(123)
simAlleleFreqs()

# }

Run the code above in your browser using DataLab