if(require(ape) && require(phylobase)){
data(tithonia)
tre <- read.tree(text=tithonia$tre)
traits <- log(tithonia$tab + 1)
rownames(traits) <- gsub("_", ".", rownames(traits))
## build a phylo4d object
x <- phylo4d(tre, traits)
oldpar <- par(mar=rep(.1,4))
table.phylo4d(x)
par(oldpar)
}
Run the code above in your browser using DataLab