toTriangular | R Documentation |
Function toTriangular
converts a named vector of genotype counts
into a triangular matrix format, with homozygotes on the diagonal and
heterozygotes below the diagonal.
toTriangular(x)
x |
A vector of genotype counts |
a matrix
Jan Graffelman jan.graffelman@upc.edu
x <- c(AA=20,AB=52,AC=34,BB=17,BC=51,CC=26)
print(x)
X <- toTriangular(x)
print(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.