MMD: Mismatch Distribution

Description Usage Arguments Details Author(s) References Examples

View source: R/MMD.R

Description

This function draws a histogram of the frequencies of pairwise distances from a set of DNA sequences.

Usage

1
2
MMD(x, xlab = "Distance", main = "", rug = TRUE, legend = TRUE,
    lcol = c("blue", "red"), lty = c(1, 1), bw = 2, ...)

Arguments

x

a set of DNA sequences (object of class "DNAbin").

xlab

the label for the x-axis.

main

the title (none by default).

rug

a logical specifying whether to add a rug of the pairwise distances on the horizontal axis (see rug).

legend

a logical specifying whether to draw a legend.

lcol

the colours used for the curves.

lty

the line types for the curves

bw

the bandwidth used for the empirical density curve (passed to density).

...

further arguments passed to hist.

Details

The histogram shows the observed distribution of pairwise distances. The lines show an empirical density estimate (in blue) and the expected distribution under stable population population (Rogers and Harpending 1992).

Author(s)

Emmanuel Paradis and David Winter

References

Rogers, A. R. and Harpending, H. (1992) Population growth makes waves in the distribution of pairwise genetic-differences. Molecular Biology and Evolution, 9, 552–569.

Examples

1
2
3
4
data(woodmouse)
MMD(woodmouse, col = "grey")
MMD(woodmouse, breaks = 20, legend = FALSE)
MMD(woodmouse, lty = 1:2, lcol = rep("black", 2), col = "lightgrey")

pegas documentation built on May 29, 2017, 6:33 p.m.

Search within the pegas package
Search all R packages, documentation and source code