Learn R Programming

RAM (version 1.2.1.3)

data.clust: Plot Hierarchical Cluster Of Samples Based on OTU Table or Taxonomic Abundance Matrix

Description

This function plot hierarchical cluster Of ecology data set.

Usage

data.clust(data, is.OTU=TRUE, meta, rank=NULL, top=NULL, mode="number", group=4, data.trans=NULL, dist=NULL, clust=NULL, type=NULL, main=NULL, file=NULL, ext=NULL, width=8, height=8)

Arguments

data
an ecology data set to be analyzed.
is.OTU
logical. If an OTU table was provided, is.OTU should be set as TRUE; otherwise, it should be set as FALSE.
meta
the metadata table associated with ecology data set.
rank
optional. If no rank was provided, the data will be used as it is, if rank is provided, if data is an OTU table, it will be converted to taxonomic abundance matrix at the given rank, no change will be made for a data that has already been a taxonomic abundance matrix. See also tax.abund and data.revamp
top
the top otuIDs or taxa to be considered for the clustering analysis. See also data.revamp
mode
either be "number" or "percent". See also data.revamp
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 was provided, numeric data will be transformed. See also decostand
dist
optional. If was provided, distance matrix will be calculated using the given method; otherwise use vegdist default Bray-Curtis method. See also vegdist and gowdis.
clust
optional. If was 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 returns a tree plot of the hierarchical cluster of the samples based on ecological data.

Examples

Run this code
data(ITS1, meta)
## Not run: 
# data.clust(data=ITS1, is.OTU=TRUE, data.trans="total", 
#            dist="bray", type="fan", meta=meta, group="Plots")
# ## End(Not run)

Run the code above in your browser using DataLab