style_roxygen_code_example {styler}R Documentation

Style a roxygen code example that may contain dontrun and friends

Description

Parses roxygen2 comments into code, breaks it into dont* (dontrun, donttest, dontshow) and run sections and processes each segment individually using style_roxygen_example_snippet().

Usage

style_roxygen_code_example(example, transformers, base_indention)

Arguments

example

Roxygen example code.

transformers

Passed to cache_make_key() to generate a key.

base_indention

Integer scalar indicating by how many spaces the whole output text should be indented. Note that this is not the same as splitting by line and add a base_indention spaces before the code in the case multi-line strings are present. See 'Examples'.

Hierarchy

Styling involves splitting roxygen example code into segments, and segments into snippets. This describes the process for input of parse_transform_serialize_roxygen():

Finally, that we have roxygen code snippets that are either dont* or not, we style them in style_roxygen_example_snippet() using parse_transform_serialize_r().


[Package styler version 1.7.0 Index]