Description Usage Arguments Details References Examples
Experimental plot function for visualing phylogenetic signal in a tree using blocks to represent branches.
1 |
tree |
phylogenetic tree (ape class) |
trait |
vector or matrix of traits for each tip |
title |
title of plot (default NULL) |
No details
No references yet! https://github.com/DomBennett/MoreTreeTools.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.