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.
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)
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)
.
A phylogenetic tree, in ape's phylo
format.
Logical: return only descendant indices of tip species?
Logical: return the row indices in the edge matrix?
Name of the file to store cached results
Expression to evaluate
Logical: force re-evaluation of expr and regeneration of filename?
For drop.likelihood
, an object that has a
likelihood
attribute to be removed (saves space on object
save); for get.likelihood
, retrieves the function.
Undocumented currently
Richard G. FitzJohn