adj_matrix_to_tree: Create a tree object of class "phylo" from an adjacency...

View source: R/SupplementaryFunctions.R

adj_matrix_to_treeR Documentation

Create a tree object of class "phylo" from an adjacency matrix

Description

Create a tree object of class "phylo" from an adjacency matrix

Usage

adj_matrix_to_tree(edges)

Arguments

edges

Dataframe comprising an adjacency matrix, in which the first column is the parent and the second is the daughter.

Value

A phylo object.

Author(s)

Rob Noble, robjohnnoble@gmail.com

Examples

edges1 <- data.frame(Parent = c(1,1,1,3,3), Identity = 2:6)
tree <- adj_matrix_to_tree(edges1)
class(tree)


ggmuller documentation built on Feb. 16, 2023, 7:42 p.m.