Following on my prior three posts
3), a fourth new addition to the
latest CRAN update to phytools is a method for mapping the
observed and reconstructed values of a continuous character onto a tree using variable width edges:
Here's a quick demo of how it works.
First, let's load some data. This phylogenetic tree and dataset were pulled from Garland et al. (1992).
data(mammal.tree) data(mammal.data) lnHomeRange<-setNames(log(mammal.data$homeRange), rownames(mammal.data))
For our next step we create our object for plotting using
## Object of class "edge.widthMap" containing: ## (1) Phylogenetic tree with 49 tips and 48 internal nodes. ## (2) Vector of node values for a mapped quantitative ## trait.
Finally, let's make our plot.
plot(object,border=1,color=palette(), legend="log(home range)")