Learn R Programming

sdbuildR (version 2.0.0)

needs_parens: Determine whether parentheses are needed to preserve meaning

Description

Parentheses are needed when the inner operator has lower precedence than the parent, because without them the human reader might misinterpret the grouping.

Usage

needs_parens(inner_op, outer_op)

Value

logical

Arguments

inner_op

The operator inside the parentheses (or NULL)

outer_op

The operator outside (parent context, or NULL)