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

cache_find_block

Find the groups of expressions that should be processed together


Description

Every expression is an expression itself, Expressions on same line are in same block. Multiple expressions can sit on one row, e.g. in line comment and commands separated with ";". This creates a problem when processing each expression separately because when putting them together, we need complicated handling of line breaks between them, as it is not apriori clear that there is a line break separating them. To avoid this, we put top level expressions that sit on the same line into one block, so the assumption that there is a line break between each block of expressions holds.

Usage

cache_find_block(pd)

Arguments

pd

A top level nest.

Details

we want to for turning points:

  • change in cache state is a turning point

  • expressions that are not on a new line cannot be a turning point. In this case, the turning point is moved to the first expression on the line


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.