I have strings, which describe mathematical formulas and I would like to convert it into lists of meaningful parts. The function ast_
does know how to parse it, to displays it as an Abstract Syntax Tree but does not return the AST. I am looking for a function which does return the tree.
bb <- "(media.urin_A + media.urin_B)/2"
lazyeval::ast_(rlang::parse_expr(bb))
> lazyeval::ast_(rlang::parse_expr(bb))
┗ ()
┗ `/
┗ ()
┗ `(
┗ ()
┗ `+
┗ `media.urin_A
┗ `media.urin_B
┗ 2