set_node_names: If nodes are not named, give them default names

View source: R/tree_manipulation.R

set_node_namesR Documentation

If nodes are not named, give them default names

Description

In phylostratr, all nodes in a tree need to be named, since the names are used to merge trees.

Usage

set_node_names(x, ...)

## S3 method for class 'Strata'
set_node_names(x, ...)

## S3 method for class 'phylo'
set_node_names(x, default_names = paste0("n", nodes(x)), ...)

Arguments

x

phylo or Strata object

...

Arguments passed to set_node_names.phylo

default_names

node names to use if they are missing. Must be a vector with a number of elements equal to the number of nodes in the tree.

Value

phylo or Strata object


arendsee/phylostratr documentation built on Dec. 31, 2022, 10:22 a.m.