graphClust: Phylogenetically constrained clustering

Description Usage Arguments Details Value Examples

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 phylo4d object.

trait

the traits in the phylo4d object to use for clustering. Can be a character vector giving the name of the traits or numbers giving the column index in the table of the data slot of the phylo4d object.

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 "line", "rectangle" or "ellipse".

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 TRUE) indicating if lim.phylo and lim.trait are scaled (divided by their max value).

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)


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

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.