Description Usage Arguments Details Value Author(s) References Examples

Extract MEM eigenvectors given a distance matrix among sampling locations of genetic material. This matrix could be Euclidean or otherwise. If truncation and/or transformation parameters are provided these operations occur. Truncation implies that distances that exceed a threshold amount are assigned to 4 * threshold. Minimum spanning tree truncation is the recommended default. Transformation performs an exponential or gaussian transformation of the distance matrix after truncation.

1 |

`locD` |
A symmetric distance matrix giving the distances (typically Euclidean) among the sampling locations of genetic material (e.g. of genotyped individuals or populations). |

`truncation` |
See details (EXPERIMENTAL) |

`transformation` |
Can be character "exponential" or "gaussian" or NULL for no transformation (EXPERIMENTAL) |

If sampling locations are in longitude/latitude and are far apart, be sure to
supply the geodesic distance as `locD`

. (Note that `mgQuick`

implements
geodesic distances using the `longlat=TRUE`

parameter when provided with sampling coordinates)

`truncation`

1. Can be numeric from 0 to 1 specifying the
proportion of the maximum distance in locD to truncate
following this a spanning tree is used to further
truncate as in PCNM (aka dbMEM or classical MEM)

2. Can be NULL (default) indicating only the minimum spanning tree (MST) truncation where
links that exceed the longest link in the MST (dMST) are replaced with 4 * dMST

3. Can be FALSE indicating that nothing is done to the distance matrix which is only suitable when locD is non-euclidean (i.e. will have negative eigenvectors

A list

`$valuesMEM`

gives the eigenvalues all MEM eigenvectors

`$vectorsMEM`

gives the MEM eigenvectors in columns

Pedro Peres-Neto ([email protected])

Paul Galpern ([email protected])

Legendre, P., and Legendre L. 2012. Numerical Ecology, 3rd. ed. Elsevier, Amsterdam.

1 2 3 4 5 6 7 8 | ```
## Prepare the radial data for analysis
radialData <- read.csv(system.file("extdata/radial.csv", package="memgene"))
radialXY <- radialData[, 1:2]
## Find MEM eigenvectors given sampling locations
## by first finding the Euclidean distance matrix
radialEuclid <- dist(radialXY)
radialMEM <- mgMEM(radialEuclid)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.