META.clust: Plot Hierarchical Cluster Of Metadata

Description Usage Arguments Value Author(s) See Also Examples

Description

This function plot hierarchical cluster Of metadata.

Usage

1
2
3
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.

Author(s)

Wen Chen

See Also

vegdist and gowdis.

Examples

1
2
3
4
5
6
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")

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
Loading required package: ggplot2
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
[1] "A total of  1  columns are removed:  Harvestdate"
[1] "columns in exclude list: "
[1] "column# with missing data: "
[1] "columns# with one level: "
[1] "column# that are not numeric or factor: 6"
[1] "A total of  1  columns are removed:  Harvestdate"
[1] "columns in exclude list: "
[1] "column# with missing data: "
[1] "columns# with one level: "
[1] "column# that are not numeric or factor: 6"
[1] "A total of  1  columns are removed:  Harvestdate"
[1] "columns in exclude list: "
[1] "column# with missing data: "
[1] "columns# with one level: "
[1] "column# that are not numeric or factor: 6"
[1] "A total of  1  columns are removed:  Harvestdate"
[1] "columns in exclude list: "
[1] "column# with missing data: "
[1] "columns# with one level: "
[1] "column# that are not numeric or factor: 6"

RAM documentation built on May 2, 2019, 3:04 p.m.