powered by
Function af computes the allele frequencies for a matrix or a vector containing genotypic compositions.
af
af(x)
a vector with allele frequencies
a vector or matrix with compositions
Jan Graffelman (jan.graffelman@upc.edu)
maf
X <- as.vector(rmultinom(1,100,c(0.5,0.4,0.1))) X <- X/sum(X) print(X) print(af(X))
Run the code above in your browser using DataLab