3 \alias{dist.gene.pairwise}
4 \alias{dist.gene.percentage}
5 \title{Pairwise Distances from Genetic Data}
7 dist.gene(x, method = "pairwise", variance = FALSE)
8 dist.gene.pairwise(x, variance = FALSE)
9 dist.gene.percentage(x, variance = FALSE)
12 \item{x}{a matrix or a data frame.}
13 \item{method}{a character string specifying the method used to compute
14 the distances; only two choices are available: \code{"pairwise"},
15 and \code{"percentage"}.}
16 \item{variance}{a logical, indicates whether the variance of the
17 distances should be returned (default to FALSE).}
20 These functions compute a matrix of distances between pairs of
21 individuals from a matrix or a data frame of genetic data.
24 This function is meant to be very general and accepts different kinds
25 of data (alleles, haplotypes, DNA sequences, and so on). The rows of
26 the data matrix represent the individuals, and the columns the loci.
28 In the case of the pairwise method, the distance \eqn{d} between two
29 individuals is the number of loci for which they differ, and the
30 associated variance is \eqn{d(L - d)/L}, where \eqn{L} is the number
33 In the case of the percentage method, this distance is divided by \eqn{L},
34 and the associated variance is \eqn{d(1 - d)/L}.
36 For more elaborate distances with DNA sequences, see the function
40 either a numeric matrix with possibly the names of the individuals (as
41 given by the rownames of the argument \code{x}) as colnames and rownames
42 (if \code{variance = FALSE}, the default), or a list of two matrices names
43 \code{distances} and \code{variance}, respectively (if \code{variance =
46 \author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
48 \code{\link{dist.dna}}, \code{\link{cophenetic.phylo}}