3 \title{Nucleotide Diversity}
5 This function computes the nucleotide diversity from a sample of DNA
9 nuc.div(x, variance = FALSE, pairwise.deletion = FALSE)
12 \item{x}{a matrix or a list which contains the DNA sequences.}
13 \item{variance}{a logical indicating whether to compute the variance
14 of the estimated nucleotide diversity.}
15 \item{pairwise.deletion}{a logical indicating whether to delete the
16 sites with missing data in a pairwise way. The default is to delete
17 the sites with at least one missing data for all sequences.}
20 The nucleotide diversity is the sum of the number of differences
21 between pairs of sequences divided by the number of comparisons
22 (i.e. n(n - 1)/2, where n is the number of sequences).
24 The variance of the estimated diversity uses formula (10.9) from Nei
25 (1987). This applies only if all sequences are of the same lengths,
26 and cannot be used if \code{pairwise.deletion = TRUE}. A bootstrap
27 estimate may be in order if you insist on using the latter option.
30 A numeric vector with one or two values (if \code{variance = TRUE}).
33 Nei, M. (1987) \emph{Molecular evolutionary genetics}. New York:
34 Columbia University Press.
36 \author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
38 \code{\link{base.freq}}, \code{\link{GC.content}},
39 \code{\link{theta.s}}, \code{\link{seg.sites}}
44 nuc.div(woodmouse, TRUE)
45 nuc.div(woodmouse, FALSE, TRUE)