View source: R/summarize_dataset.R
calc_genotype_distance | R Documentation |
Given two vectors representing genotypes, produce a scalar value for the distance between them. The vectors should be sorted the same such that the each two values of each vector represent two alleles of the same locus. In this implementation the distance is simply the number of mismatches between the alleles for each locus, accounting for either order of alleles.
calc_genotype_distance(g1, g2, na_reject = TRUE)
g1 |
vector for genotype. |
g2 |
vector for genotype. |
na_reject |
logical; should NA entries be treated as mismatches? TRUE by default. |
numeric distance score for the pair of input genotypes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.