Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

node_topology

Node properties related to the graph topology


Description

These functions calculate properties that are dependent on the overall topology of the graph.

Usage

node_dominator(root, mode = "out")

node_topo_order(mode = "out")

Arguments

root

The node to start the dominator search from

mode

How should edges be followed. Either 'in' or 'out'

Value

A vector of the same length as the number of nodes in the graph

Functions

Examples

# Sort a graph based on its topological order
create_tree(10, 2) %>%
  arrange(sample(graph_order())) %>%
  mutate(old_ind = seq_len(graph_order())) %>%
  arrange(node_topo_order())

tidygraph

A Tidy API for Graph Manipulation

v1.2.0
MIT + file LICENSE
Authors
Thomas Lin Pedersen [cre, aut] (<https://orcid.org/0000-0002-5147-4711>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.