powered by
Function maf computes the minor allele frequency for a matrix or vector of compositions.
maf
maf(x)
a vector of minor allele frequencies.
a vector or matrix of genotypic compositions
Jan Graffelman (jan.graffelman@upc.edu)
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