Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

PhyloCompare

Compares sister groups


Description

Calculates the comparison of some statistic between sister groups along a phylogeny

Usage

PhyloCompare(tree, node.data, ComparisonFunc = PCAsimilarity, ...)

Arguments

tree

phylogenetic tree

node.data

list of node data

ComparisonFunc

comparison function, default is PCAsimilarity

...

Aditional arguments passed to ComparisonFunc

Value

list with a data.frame of calculated comparisons for each node, using labels or numbers from tree; and a list of comparisons for plotting using phytools (see examples)

Note

Phylogeny must be fully resolved

Author(s)

Diogo Melo

Examples

library(ape)
data(bird.orders)
tree <- bird.orders
mat.list <- RandomMatrix(5, length(tree$tip.label))
names(mat.list) <- tree$tip.label
sample.sizes <- runif(length(tree$tip.label), 15, 20)
phylo.state <- PhyloW(tree, mat.list, sample.sizes)

phylo.comparisons <- PhyloCompare(tree, phylo.state)

# plotting results on a phylogeny:
## Not run: 
library(phytools)
plotBranchbyTrait(tree, phylo.comparisons[[2]])

## End(Not run)

evolqg

Tools for Evolutionary Quantitative Genetics

v0.2-8
MIT + file LICENSE
Authors
Ana Paula Assis, Diogo Melo, Edgar Zanella, Fabio Andrade Machado, Guilherme Garcia
Initial release
2020-11-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.