Re: [Rd] bug: deparse sometimes omits parentheses for unary operators

2017-07-08 Thread Radford Neal
> From: "Binder, Martin" > To: r-devel@r-project.org > Subject: [Rd] bug: deparse sometimes omits parentheses for unary > operators > > Example (bad): > > (expr = substitute(-a * 10, list(a = quote(if (TRUE) 1 else 0 > -if (TRUE) 1 else 0 *

[Rd] bug: deparse sometimes omits parentheses for unary operators

2017-07-07 Thread Binder, Martin
When turning a language object into a string (e.g. using dput, deparse, or just printing it), R usually inserts parentheses so that the printed string is an accurate representation of the underlying AST. Example (good): (expr = substitute(a * 10, list(a = quote(if (TRUE) 1 else 0 (if (TRU