add_rootbranch: Add a branch to the root of the tree

add_rootbranchR Documentation

Add a branch to the root of the tree

Description

This function adds a branch to the root of the tree, adding one extra node in the process.

Usage

add_rootbranch(tree, branch_length = 1)

Arguments

tree

A phylogeny of class phylo, with edge lengths

branch_length

The length of the root branch

Value

An object of class phylo

Examples

tree <- ape::read.tree(text = "(a:1, b:1);")
tree <- add_rootbranch(tree)
plot(tree)


SWittouck/tidyorthogroups documentation built on June 1, 2024, 10:49 p.m.