Skip to contents

Adds labels to nodes with no assigned label

Usage

tree_add_nodelabels(tree = NULL, node_prefix = "n", node_index = "node_number")

Arguments

tree

A tree either as a newick character string or as a phylo object.

node_prefix

Character vector. If length 1, it will be used to name all nodes with no labels, followed by a number which can be the node_number or consecutive, as specified in node_index.

node_index

Character vector. Choose between "from_1" and "node_number" as numeric index for node labels. It will use consecutive numbers from 1 to total node number in the first case and phylo node numbers in the second case (i.e, from Ntip + 1).

Value

A phylo object