powered by
Function maf computes the minor allele frequency for a matrix or vector of compositions.
maf
maf(x)
a vector or matrix of genotypic compositions
a vector of minor allele frequencies.
# NOT RUN { X <- as.vector(rmultinom(1,100,c(0.5,0.4,0.1))) X <- X/sum(X) print(X) print(maf(X)) # }
Run the code above in your browser using DataLab