getChilds: Get the child expression of an expression in the parse tree

Description Usage Arguments Value Author(s) See Also

Description

Get the child expression of an expression in the parse tree

Usage

1
2
  getChilds(x, i = 0,
    parent = sapply(x[i], function(.) attr(., "id")))

Arguments

x

Output from the parser function

i

index of the top-level expressions we want the childs of. The default value (0) means all top level expressions

parent

id of the parent expressions as found in the id column

Value

An integer vector giving all the ids of symbols that are childs of one of the parent expression

Author(s)

Romain Francois <romain@r-enthusiasts.com>

See Also

parser


halpo/parser documentation built on May 17, 2019, 2:27 p.m.