Learn R Programming

styler (version 0.0-8)

extract_neighbourhood: Extract text around the highlighted text

Description

Extracts unselected text on highlighted lines and text on other lines

Usage

extract_neighbourhood(text, context)

Arguments

text

Character vector that contains highlighted area.

context

The context from find_active_context().

Value

A character vector of length three.

  • The first element corresponds to the text on the start line that was not selected.

  • The second element to the text on the end line that was not selected.

  • The third element are the lines that are not overlapping with the highlighted text.