Learn R Programming

bayou (version 2.1.1)

identifyBranches: Identify shifts on branches of a phylogenetic tree

Description

This is a convenience function for mapping regimes interactively on the phylogeny. The method locates the nearest branch to where the cursor is clicked on the plot and records the branch number and the location selected on the branch.

Usage

identifyBranches(tree, n, fixed.loc = TRUE, plot.simmap = TRUE)

Arguments

tree

An object of class 'phylo'

n

The number of shifts to map interactively onto the phylogeny

fixed.loc

A logical indicating whether the exact location on the branch should be returned, or the shift will be free to move along the branch

plot.simmap

A logical indicating whether the resulting painting of regimes should be plotted following the selection shift location.

Value

Returns a list with elements "sb" which contains the branch numbers of all selected branches with length "n". If "fixed.loc=TRUE", then the list also contains a vector "loc" which contains the location of the selected shifts along the branch.

Details

identifyBranches opens an interactive phylogeny plot that allows the user to specify the location of shifts in a phylogenetic tree.