utilities {diversitree}R Documentation

Utility Functions

Description

These are utility functions that are used internally by diversitree, but which might be more generally useful.

Currently only get.descendants docuemnted here, which determines which species or nodes are descended from a particular node.

Usage

get.descendants(node, tree, tips.only=FALSE, edge.index=FALSE)
run.cached(filename, expr, regenerate=FALSE)
expand.parameters(p, lik.new, repl=0, target=argnames(lik.new))
get.likelihood(object)
drop.likelihood(object)

Arguments

node

A node, either a name in tree$node.label, an integer in 1..tree$Nnode, or in length(tree$tip.label)..(length(tree$tip.label)+tree$Nnode).

tree

A phylogenetic tree, in ape's phylo format.

tips.only

Logical: return only descendant indices of tip species?

edge.index

Logical: return the row indices in the edge matrix?

filename

Name of the file to store cached results

expr

Expression to evaluate

regenerate

Logical: force re-evaluation of expr and regeneration of filename?

object

For drop.likelihood, an object that has a likelihood attribute to be removed (saves space on object save); for get.likelihood, retrieves the function.

p, lik.new, repl, target

Undocumented currently

Author(s)

Richard G. FitzJohn


[Package diversitree version 0.10-0 Index]