custom_context: custom_context

Description Usage Arguments Value

View source: R/tribble_paste.R

Description

the _context functions define lists of parameters for text formatting. The specific contexts return hard-coded values appropriate to the context they describe, while custom_context allows definition of new contexts for custom formatting.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
clipboard_context()

rstudio_context()

console_context()

markdown_context()

custom_context(
  output_mode = "console",
  nspc = 2,
  indent_context = 0,
  indent_head = TRUE
)

Arguments

output_mode

A named output mode, controls the target of the _paste functions options are "rstudioapi" or "console"

nspc

The number of spaces for each indent level in the output context

indent_context

The number of spaces applied initially to all lines in the output context

indent_head

Logical. Apply the indent_context to the to the header row? Use FALSE if targeting cursor location.

Value

an output context. An input to _paste, _format, _construct functions used to format whitespace.


datapasta documentation built on April 17, 2020, 1:27 a.m.