Learn R Programming

strataG (version 2.4.905)

maf: Minor Allele Frequencies

Description

Calculate minor allele frequencies for each locus.

Usage

maf(g, by.strata = FALSE, maf.within = FALSE)

Arguments

g

a '>gtypes object.

by.strata

logical - return results grouped by strata?

maf.within

if by.strata = TRUE, identify minor allele within each strata independently? If FALSE minor allele is identified from all individuals.

Value

A vector or matrix of minor allele frequencies at each locus.

See Also

alleleFreqs

Examples

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

maf(msats.g)

# minor allele identified from all indivudals
maf(msats.g, by.strata = TRUE)

# minor allele identified within each strata
maf(msats.g, by.strata = TRUE, maf.within = TRUE)

# }

Run the code above in your browser using DataLab