gen.dist: Genetic distance

Description Usage Arguments Value References

View source: R/genepop.utilities.R


gen.dist calculates the Jost's D between all possible population pairs using the R package mmod.

This function takes the output from the function clean.genepop (or multi.clean.genepop) as input and uses the R package adegenet to convert the input in a genind object.

A text file with extension .pairD that contains a pairwise distance matrix is saved to disk.

mean.type can be set to either "arithmetic" or "harmonic" (default), which is used to calculate the global estimates of Hs and Ht (see mmod's manual for details).


gen.dist(fname, mean.type = "harmonic")



A character vector with the name of the input file including the path


The type of mean to be calculated over multiple loci


Save to disk a file with same root of the input file with extension .pairD


Jost, L.O.U., 2008. GST and its relatives do not measure differentiation. Molecular Ecology 17, 4015-4026.

Winter, D.J., 2012. mmod: an R library for the calculation of population differentiation statistics. Molecular Ecology Resources 12, 1158-1160.

carlopacioni/HexSimR documentation built on April 15, 2019, 10:48 a.m.