data.tree (version 0.7.8)

Navigate: Navigate to another node by relative path.

Description

Navigate to another node by relative path.

Usage

Navigate(node, path)

Arguments

node

The starting Node to navigate

path

A string or a character vector describing the path to navigate

Details

The path is always relative to the node. Navigation to the parent is defined by .., whereas navigation to a child is defined via the child's name. If path is provided as a string, then the navigation steps are separated by '/'.

See Also

Climb

Examples

Run this code
# NOT RUN {
data(acme)
Navigate(acme$Research, "../IT/Outsource")
Navigate(acme$Research, c("..", "IT", "Outsource"))

# }

Run the code above in your browser using DataCamp Workspace