formatTree: A theme function for formatting of an igraph to be shown in...

Description Usage Arguments Value See Also Examples

View source: R/formatTree.R

Description

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

Usage

1
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

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

TreeAndLeaf documentation built on Nov. 8, 2020, 4:51 p.m.