dendrogram_plot_col: Plot dendrogram

Description Usage Arguments Examples

Description

Plot dendrogram of hierarchical clustering results with different colors

Usage

1
2
dendrogram_plot_col(dataset, hc.result, classes.col, colors = NULL, title = "", 
lab.cex = 1, leg.pos = "topright", label_samples=NULL,...)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

hc.result

object of class hclust with the clustering results.

classes.col

string or index indicating what metadata to use to color the leafs.

colors

vector with the corresponding colors of the metadata classes.

title

title of dendrogram.

lab.cex

the magnification to be used for x and y labels relative to the current setting of cex.

leg.pos

position of the legend.

label_samples

string or index indicating what metadata to use to name the leafs. If not provided the name of the leafs will remain the samples names.

...

other parameters for plotting.

Examples

1
2
3
4
5
6
  ## Example of colored dendrogram
  library(specmine.datasets)
  data(cachexia)
  hc.result = hierarchical_clustering(cachexia)
  dendrogram_plot_col(cachexia, hc.result, "Muscle.loss", 
  title = "Example")

specmine documentation built on Sept. 21, 2021, 5:06 p.m.