Description Usage Arguments Value References Examples
This function calculates the distance between individuals in a genind object based on their genotypes. Specifically, the simple metric of Kosman and Leonard (2005) in which distance is calculated as a propotion of shared alleles at each locus.
1 | dist.codom(x, matrix = TRUE, global = TRUE, na.rm = TRUE)
|
x |
genind object (from package adegenet) |
matrix |
boolean: if TRUE return matrix (dist object if FALSE) |
global |
boolean: if TRUE, return a single global estimate based on all loci. If FALSE return a list of matrices for each locus. if FALSE |
na.rm |
boolean: if TRUE remove individuals with NAs |
either a list of distance matrices, one for each locus or a single matrix containing the mean distance between individuals across all loci
Dropped for each distance matrix and object of class "na.action" containing indices to those indivudals in the genind object which where omitted due to having NAs
Kosman E., Leonard, K.J. Similarity coefficients for molecular markers in studies of genetic relationships between individuals for haploid diploid, and polyploid species. Molecular Ecology. 14: 415-424
1 2 3 | data(nancycats)
dm <- dist.codom(nancycats[40:45], matrix=FALSE)
head(dm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.