Skip to contents

Traverses a gating tree starting from a specified root node to find and return a node located at a given path. The path should be a sequence of node names indicating the traversal route from the root to the target node.

Usage

findNodeByPath(rootNode, path)

Arguments

rootNode

The root node of the gating tree from which to start the search.

path

A character vector representing the path to the desired node. Each element of the vector should correspond to a node name at each level of the tree.

Value

Returns the node at the specified path if found.

Examples

if (FALSE) { # \dontrun{
rootNode <- createGatingTreeObject(...) # setup initial node, assumes function definition
path <- c("rootNode", "CD4pos", "CD8neg") # example path to find a specific node
tryCatch({
  targetNode <- findNodeByPath(rootNode, path)
  print(targetNode)
}, error = function(e) {
  cat("Error in findNodeByPath: ", e$message, "\n")
})
} # }