DI_dendrogram {biosurvey}R Documentation

Plot dissimilarities withing and among sets of selected sites as a dendrogram

Description

Plot dissimilarities withing and among sets of selected sites as a dendrogram

Usage

DI_dendrogram(DI_selected_sites, selection_type = "selections",
              selection_number = 1, labels = NULL, xlab = "",
              ylab = "Distance", main = "Cluster dendrogram",
              sub = "", ...)

Arguments

DI_selected_sites

list of results obtained with function selected_sites_DI.

selection_type

type of selection to be considered when creating DI matrix plot. Options are: "selections", "random", "E", "G", and "EG". The default, "selections", plots a comparison among all selection types.

selection_number

(numeric) number of selection to be plotted. Default = 1. Ignored if selection_type = "selections".

labels

(character) vector of labels for the tips of the tree. The default, NULL, uses names of sets of selected sites. If labels = FALSE no tip labels are plotted.

xlab

(character) label for x-axis of plot. Default = "".

ylab

(character) label for y-axis of plot. Default = "Distance".

main

(character) title for the plot. Default = "Cluster dendrogram".

sub

(character) subtitle for the plot. Plotted below the label of the x-axis.

...

other arguments to be passed to plot method for objects of class "hclust". See more details in hclust.

Value

A dendrogram plot of a "hclust" object.

Examples

# Data
data("b_pam", package = "biosurvey")
data("m_selection", package = "biosurvey")

# Subsetting base PAM according to selections
sub_pam_all <- subset_PAM(b_pam, m_selection, selection_type = "all")

# Calculating dissimilarities
DI_sel <- selected_sites_DI(sub_pam_all)

# Plot
DI_dendrogram(DI_sel)

[Package biosurvey version 0.1.1 Index]