Skip to contents

Query hierarchy relationships

Usage

children_of(relationships, id, level = NULL)

parent_of(relationships, id, level = NULL)

descendants_of(relationships, id, level = NULL)

ancestors_of(relationships, id, level = NULL)

hierarchy_path(relationships, id, level = NULL)

Arguments

relationships

A d_relationships() table or hierarchy state.

id

Stable node identifier.

level

Optional node level used to disambiguate repeated identifiers.

Value

children_of() and parent_of() return normalized edge subsets; descendants_of() and ancestors_of() return node tables; and hierarchy_path() returns the root-to-node IDs.