topological_order: Topological order

Description Usage Arguments Value Examples

View source: R/topological_order.R

Description

Compute the topological order of a tree

Usage

1
topological_order(MTG, ascend = FALSE)

Arguments

MTG

An MTG tree as from read_mtg()

ascend

Is the order computed from the base (TRUE), or the tip (FALSE) ?

Value

Nothing, update the values of the MTG in-place. The MTG is enriched with the topological order of each node

Examples

1
2
3
4
filepath= system.file("extdata", "simple_plant.mtg", package = "XploRer")
MTG= read_mtg(filepath)
topological_order(MTG)
print(MTG, "topological_order")

VEZY/XploRer documentation built on Oct. 9, 2021, 10:05 p.m.