Enclose selected rows with lines above and below:

  • rs_enclose_all_with_lines() - all selected rows;

  • rs_enclose_first_row_with_lines() - the first selected row only.

rs_enclose_all_with_lines(above = NA, below = NA,
  ensure_blank_above = FALSE, context = get_context())

rs_enclose_first_row_with_lines(above = NULL, below = NULL,
  ensure_blank_above = FALSE, context = get_context())

Arguments

above

(character) Text to be inserted in the row above the selection.

below

(character) Text to be inserted in the row below the selection (or the first row).

ensure_blank_above

(logical) If TRUE, checks if there is a blank line above the selection. If line is not blank, a blank line is added. If FALSE, blank line is not added.

context

Object with context of active R Studio document (class document_context).