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

add_stylerignore

Adds the stylerignore column


Description

If a token should be ignored, the column is set to TRUE, otherwise to FALSE.

Usage

add_stylerignore(pd_flat)

Arguments

pd_flat

A parse table.

Details

A token is ignored iff one of the two conditions hold:

  • it falls between a start and a stop marker whereas the markers are on their own line. Which tokens are recognized as markers is controlled with the R options styler.ignore_start and styler.ignore_stop.

  • it is not a comment, but the last token on the line is a marker.

See examples in stylerignore. Note that you should reuse the stylerignore column to compute switch points or similar and not a plain pd$text == option_read("styler.ignore_start") because that will fail to give correct switch points in the case stylerignore sequences are invalid.


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.