Learn R Programming

strataG (version 2.0.2)

alleleFreqs: Allele Frequencies

Description

Calculate allele frequencies for each locus.

Usage

alleleFreqs(g, by.strata = FALSE)

Arguments

g

a '>gtypes object.

by.strata

logical. If TRUE every element in the return list is a three dimensional array where the third dimension contains frequencies and proportions for each stratum.

Value

A list of allele frequencies for each locus. Each element is a matrix or array with frequencies by count (freq) and proportion (prop) of each allele.

See Also

alleleFreqFormat

Examples

Run this code
# NOT RUN {
data(msats.g)

f <- alleleFreqs(msats.g)
f$D11t # Frequencies and proportions for Locus D11t

f.pop <- alleleFreqs(msats.g, TRUE)
f.pop$EV94[, "freq", "Coastal"] # Frequencies for EV94 in the Coastal population

# }

Run the code above in your browser using DataLab