root-method: root

root.treedataR Documentation

root

Description

re-root a tree

Usage

## S3 method for class 'treedata'
root(phy, outgroup, node = NULL, edgelabel = TRUE, ...)

Arguments

phy

tree object

outgroup

a vector of mode numeric or character specifying the new outgroup

node

node to reroot

edgelabel

a logical value specifying whether to treat node labels as edge labels and thus eventually switching them so that they are associated with the correct edges.

...

additional parameters passed to ape::root.phylo

Value

rerooted treedata


YuLab-SMU/tidytree documentation built on July 30, 2024, 8:07 p.m.