species.tip.length {phyloraster}R Documentation

Compute species tip length

Description

Computation of species tip length using a phylogeny.

Usage

species.tip.length(tree = NULL, edge.info = NULL, ...)

Arguments

tree

phylo. A dated tree.

edge.info

Object returned by tip.root.path consisting of a list containing the edge matrix (H1) with the path from tip to root and and a numeric vector (edge.length) giving the length of each branch of the tree.

...

additional arguments to be passed passed down from a calling function.

Details

Calculates tip lengths for all species in a phylogeny

Value

returns a numeric vector giving the length of species branch.

Author(s)

Neander M. Heming

Examples

library(phyloraster)
tree <- ape::read.tree(system.file("extdata", "tree.nex",
package="phyloraster"))

species.tip.length(tree)

library(ape)
set.seed(1)
tree <- rtree(n=40)

plot(tree)

species.tip.length(tree)

edge.info <- tip.root.path(tree)

species.tip.length(edge.info = edge.info)


[Package phyloraster version 2.1.0 Index]