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

View source: R/transform-files.R

split_roxygen_segmentsR Documentation

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.


krlmlr/styler documentation built on Dec. 12, 2024, 8:36 a.m.