For example, if our tree structure is given by list(a = list(b = 1, c = 2)) then calling find('a/b') on the root node will return 1.

treeSkeleton__find(key)

Arguments

key

character. The key to find in the given tree structure, whether nodes are named by their name in the children() list. Numeric indices can be used to refer to unnamed nodes. For example, if key is a/2/b, this method would try to find the current node's child a's second child's b child. (Just look at the examples).

Value

the subtree or terminal node with the given key.

Examples

not_run({ sr <- stageRunner$new(new.env(), list(a = list(force, list(b = function(x) x + 1)))) stagerunner:::treeSkeleton$new(sr)$find('a/2/b') # function(x) x + 1 })