Learn R Programming

evobiR (version 1.1)

AncCond: Calculate the mean of a continuous character at the origin of derived state of a binary charachter

Description

This function uses stochastic mapping and ancestral state reconstruction to determine if the derived state of a binary trait originates when a continuous trait has an extreme value.

Usage

AncCond(trees, data, derived.state, iterations=1000)

Arguments

trees
tree(s) of class phylo or multiPhylo
data
a dataframe with 3 columns. The first should match the taxa names in the tree, the second should have the continuous trait values and the third the states for the binary character
derived.state
the derived condition for the binary trait
iterations
the number of iterations to be used in estimating significance

Value

Details

This function uses stochastic mapping and ancestral state reconstruction as implemented in phytools to determine if the derived state of a binary trait originates when a continuous trait has an extreme value. This test assumes that the derived state of the binary character may lead to correlated selection in the continuous trait. Because of this the ancestral state reconstruction of the continuous trait is based only on data from species that remain in the ancestral condition for the binary trait

References

http://coleoguy.github.io/

Examples

Run this code
## Not run: 
# data(mite.trait)
# data(trees.mite)
# AncCond(trees, mite.trait, derived.state = "haplodiploidy", iterations=100) 
# ## End(Not run)

Run the code above in your browser using DataLab