document (version 3.3.4)

get_lines_between_tags: Cut Code Chunks From a File

Description

Get all lines between tagged lines. The tagged lines themselves may be in- or excluded from the selection.

Usage

get_lines_between_tags(
  file_name,
  keep_tagged_lines = TRUE,
  begin_pattern = "ROXYGEN_START",
  end_pattern = "ROXYGEN_STOP",
  from_first_line = TRUE,
  to_last_line = TRUE
)

Value

A character vector of matching lines.

Arguments

file_name

The name of the R code file to be parsed.

keep_tagged_lines

Keep tagged lines output?

begin_pattern

A pattern that marks the line beginning a roxygen2 chunk.

end_pattern

A pattern that marks the line ending a roxygen2 chunk.

from_first_line

Use first line as tagged line if first tag found matches the end_pattern?

to_last_line

Use last line as tagged line if last tag found matches the begin_pattern?