Learn R Programming

RAM (version 1.2.1.3)

META.clust: Plot Hierarchical Cluster Of Metadata

Description

This function plot hierarchical cluster Of metadata.

Usage

META.clust(meta, group=4, data.trans=NULL, dist=NULL, clust=NULL, type=NULL, main="", file=NULL, ext=NULL, width=8, height=8)

Arguments

meta
the metadata table to be clustered.
group
an integer or a metadata variable. If an integar, will cut tree into corresponding groups and color them accordingly; if a metadata variable was provided, tree leaves (sampleIDs) will be colored by each level.
data.trans
optional. If provided, numeric data will be transformed. See also decostand
dist
optional. If provided, distance matrix will be calculated using the give method for numeric variables; otherwise use vegdist default Bray-Curtis method. If metadata include qualitative variables, distance matrix will be calculated by gowdis.
clust
optional. If not provided, will use the default agglomeration method used by hclust, i.e. "complete". Otherwise, will used user defined method for clustering. See also hclust.
type
optional. Can be one of the following: "triangle", "rectangle", "phylogram", "cladogram", "fan", "unrooted", "radial".
main
The title of the plot.
file
optional. Filename that the plot to be saved to.
ext
optional. File type that the plot to be saved to.
width
an integer, width of the plot.
height
an integer, height of the plot.

Value

This function return a plot of the hierarchical cluster analysis on a set of metadata.

See Also

vegdist and gowdis.

Examples

Run this code
data(meta)
META.clust(meta=meta, type="fan")
META.clust(meta=meta, type="fan", group="City")
META.clust(meta=meta, type="rectangle", group="Harvestmethod")
META.clust(meta=meta, type="triangle", group="City", 
          clust="average")

Run the code above in your browser using DataLab