identifyBranches: Identify shifts on branches of a phylogenetic tree

View source: R/bayou-utilities.R

identifyBranchesR Documentation

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.

Details

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

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.


uyedaj/bayou documentation built on Jan. 28, 2024, 5:09 a.m.