Skip to contents

Given a small set of nodes, this function finds all related nodes from the beginning to end of the network. It allows branching in both directions, but does not reverse. For example, given a focal node in level 2, it finds all connected nodes in levels 1, 3,4...n, but not other level 2 nodes that are related to the same level 3 nodes.

Usage

find_related_nodes(edgedf, nodenames)

Arguments

edgedf

a tibble defining the edges of the network (relationships between nodes)

nodenames

a character vector of focal nodenames. These do not have to be within the same level of the network.

Value

a character vector of nodenames related to the focal nodes