Learn R Programming

phytools (version 0.7-20)

get.treepos: Get position or node of a plotted tree interactively

Description

Both functions return the phylogenetic position of a mouse click on a plotted tree.

get.treepos returns the index of the node at the end of the selected edge, along with the branch distance to that node.

getnode simply returns the closest node to the user mouse click.

Usage

get.treepos(message=TRUE, ...)
getnode(...)

Arguments

message

for get.treepos, a logical value indicating whether or not to print an instructional message.

...

optional arguments.

Value

A list for get.treepos and a node number for getnode.

Details

Both functions are primarily meant to be used internally by other phytools functions.

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.