formatTree {TreeAndLeaf}R Documentation

A theme function for formatting of an igraph to be shown in RedeR

Description

Applies formatting patterns to an igraph object according to predefined themes. This formatting is used for plotting on the RedeR app interface.

Usage

formatTree(gg, theme = 1, cleanalias = FALSE)

Arguments

gg

An igraph object generated by either hclust2igraph or phylo2igraph<igraph>.

theme

An integer ranging from 1 to 5 with desired theme.
Options are:
1- A clean black and blue theme, great for higher levels of user customization.
2- A theme with a palette of greens.
3- A theme with a palette of blues.
4- A theme with a palette of purples.
5- A theme with a palette of reds.
For custom formatting, see addGraph for accepted parameters <integer>.

cleanalias

A logical that removes the node aliases when set to TRUE (default = FALSE) <logical>.

Value

An igraph object with standard formatting for RedeR application.

See Also

addGraph

treeAndLeaf

Examples

hc <- hclust(dist(USArrests), "ave")
gg <- hclust2igraph(hc)
gg <- formatTree(gg = gg,
                 theme = 5)
         

[Package TreeAndLeaf version 1.2.0 Index]