commplot: Plot a community or traits on a phylogenetic tree

Description Usage Arguments Details References Examples

Description

Plot community or trait data on phylogeny to visualise differences in structure between traits or sites. Use colours to distinguish groups and alpha to distinguish abundances (works like rainbow())

Usage

1
2
commplot(cmatrix, tree, groups = rep(1, nrow(cmatrix)), no.margin = TRUE,
  ...)

Arguments

cmatrix

community/trait data matrix (cols taxa, rows sites)

tree

phylogenetic tree (ape class)

groups

trait or site groups

Details

No details

References

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

Examples

1
2
3
4
5
6
7
8
# Generate a balanced tree
tree <- compute.brlen (stree (16, 'balanced'))
# Generate random community data, 2 of 3 different communities
cmatrix <- matrix (round (runif (16*6, 0, 2)), nrow = 6, byrow = TRUE)
colnames (cmatrix) <- tree$tip.label
rownames (cmatrix) <- paste0 ('site_', 1:6)
# Plot community, specify group identitiy of each of the 6 sites
commplot (cmatrix, tree, groups = c (1,1,2,2,3,3))

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