blockplot: Plot Blocks for Detecting Phylogenetic Signal (experimental)

Description Usage Arguments Details References Examples

Description

Experimental plot function for visualing phylogenetic signal in a tree using blocks to represent branches.

Usage

1
blockplot(tree, trait, gradient = TRUE, title = NULL)

Arguments

tree

phylogenetic tree (ape class)

trait

vector or matrix of traits for each tip

title

title of plot (default NULL)

Details

No details

References

No references yet! https://github.com/DomBennett/MoreTreeTools.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Generate a balanced tree
#tree <- compute.brlen (stree (16, 'balanced'))
# Generate perfect phylogenetic signal traits
# (Note: trait vector should be named)
#trait <- c (rep (1, 8), rep (0, 8))
#names (trait) <- tree$tip.label
# Plot blocks ...
#blockplot (tree, factor(trait), title = 'Perfect signal', gradient = FALSE)
# Or gradient ....
#blockplot (tree, trait, title = 'Perfect signal', gradient = TRUE)
# Repeat with evenly distributed traits ...
#trait <- rep (c (0, 1), 8)
#names (trait) <- tree$tip.label
#blockplot (tree, trait, gradient = TRUE, title = 'Maximally overdispered')
# The more evenly distributed, the more symetrical
# the pattern
# A random distribution of traits ...
#trait <- randCommData (tree, nsites = 1, nspp = 8)[1, ]
#blockplot (tree, trait, title = 'Random trait', gradient = TRUE)
# ... isn't as symetrical

DomBennett/MoreTreeTools documentation built on May 6, 2019, 2:51 p.m.