Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

if_for_while_part_requires_braces

Check if if, for or while loop expression require a braces.


Description

This is the case if they are multi-line and not yet wrapped into curly braces.

Usage

if_for_while_part_requires_braces(pd, key_token)

Arguments

pd

A parse table.

key_token

The token that comes right before the token that contains the expression to be wrapped (ignoring comments). For if and while loops, this is the closing "')'", for a for-loop it's "forcond".


styler

Non-Invasive Pretty Printing of R Code

v1.4.1
MIT + file LICENSE
Authors
Kirill Müller [aut], Lorenz Walthert [cre, aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.