# Phylogenetically constrained clustering

### Description

This function extracts clusters of species based on traits values and phylogenetic proximities.

### Usage

1 2 3 | ```
graphClust(p4d, trait = names(tdata(p4d)), lim.phylo = 0.2,
lim.trait = 0.2, select.method = "ellipse", dist.phylo = "patristic",
dist.trait = "euclidean", scale.lim = TRUE)
``` |

### Arguments

`p4d` |
a |

`trait` |
the traits in the |

`lim.phylo` |
the maximum phylogenetic distance for edges selection. |

`lim.trait` |
the maximum trait-based distance for edges selection. |

`select.method` |
a character string specifying the method used to select edges.
This must be one of " |

`dist.phylo` |
a matrix of phylogenetic distances or a character string specifying a method to compute it. See Details. |

`dist.trait` |
a character string specifying the method used to compute traits distances. See Details. |

`scale.lim` |
logical (default |

### Details

If "`dist.phylo`

" is a character string,
the phylogenetic distance matrix is computed internally
using the function `distTips`

from the package adephylo.
All the methods supported by `distTips`

are available:
"`patristic`

","`nNodes`

","`Abouheif`

" and "`sumDD`

".
See `distTips`

for details about the methods.

If "`dist.trait`

" is a character string,
the traits distance matrix is computed with the `dist`

function.
All the methods supported by `dist`

are available:
"`euclidean`

","`maximum`

", "`manhattan`

",
"`canberra`

", "`binary`

" and "`minkowski`

".
See `dist`

for details about the methods.

### Value

An object of class `graphclust`

.

### Examples

1 2 3 4 5 6 | ```
data(navic)
gC <- graphClust(navic, lim.phylo = 1, lim.trait = 2, scale.lim = FALSE)
gC
plot.graphclust(gC, which = "selection", ask = FALSE)
plot.graphclust(gC, which = "graph", ask = FALSE)
plot.graphclust(gC, which = "tree", ask = FALSE)
``` |