path_vector_new: Faster way to record a path through all nodes of an adjacency...

View source: R/MullerPlot.R

path_vector_newR Documentation

Faster way to record a path through all nodes of an adjacency matrix

Description

Nodes are traversed in the order that they should be stacked in a Muller plot. Each node appears exactly twice.

Usage

path_vector_new(
  tree,
  i = NULL,
  Adj = NULL,
  Col = NULL,
  is_leaf = NULL,
  path = NULL
)

Arguments

tree

Dataframe comprising an adjacency matrix, with column names "Parent" and "Identity"

i

Current node

Adj

Adjacency matrix

Col

Node label

is_leaf

Label whether node is a leaf

path

The path vector so far

Value

A list, including a vector specifying the path.

Author(s)

Rob Noble, robjohnnoble@gmail.com

Examples

edges1 <- data.frame(Parent = c(1,1,1,3,3), Identity = 2:6)
path_vector_new(edges1)$path


robjohnnoble/ggmuller documentation built on Sept. 18, 2023, 2:09 p.m.