styler (version 1.1.1)

split_roxygen_segments: Split text into roxygen and non-roxygen example segments

Description

Split text into roxygen and non-roxygen example segments

Usage

split_roxygen_segments(text, roxygen_examples)

Arguments

text

Roxygen comments

roxygen_examples

Integer sequence that indicates which lines in text are roxygen examples. Most conveniently obtained with identify_start_to_stop_of_roxygen_examples_from_text.

Value

A list with two elements:

  • A list that contains elements grouped into roxygen and non-roxygen sections. This list is named separated.

  • An integer vector with the indices that correspond to roxygen code examples in separated.