treeSkeleton__find: Find the key with the given index using the names of the...

Description Usage Arguments Value Examples

Description

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.

Usage

1

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

1
2
3
4
5
## 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

## End(Not run)

syberia/stagerunner documentation built on May 30, 2019, 10:41 p.m.