maf: Minor Allele Frequency

Description Usage Arguments Value Examples

View source: R/maf.R

Description

Calculate minor allele frequency.

Usage

1
maf(data, which.snp = NULL)

Arguments

data

a data frame or matrix containing genotypes in the columns. Genotypes should be coded as (0, 1, 2) or (0, 1).

which.snp

a numeric value, indicating which SNP to calculate. When which.snp = NULL, MAF of all the markers is calculated. Default is NULL.

Value

The MAF of one marker.

Examples

1
2
data(diabetes.geno)
result <- maf(diabetes.geno, which.snp=10)

Example output



wtest documentation built on Sept. 3, 2019, 9:04 a.m.

Related to maf in wtest...