Learn R Programming

wtest (version 3.0)

maf: Minor allele frequency

Description

Function to calculate minor allele frequencies.

Usage

maf(data, which.marker = NULL)

Arguments

data

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

which.marker

a numeric vector with length = w.order indicates which SNP to calculate the MAF. When which.marker = NULL, MAF of all the markers is calculated. Default is NULL.

Value

The MAF of one marker

Examples

Run this code
# NOT RUN {
data(mydata)
result<-maf(mydata, which.marker=10)
# }

Run the code above in your browser using DataLab