opts_character {constructive} | R Documentation |
Constructive options for type 'character'
Description
These options will be used on objects of type 'character'. This type has a single native constructor, but some additional options can be set.
unicode_representation
and escape
are usually better set in the main
function (construct()
or other) so they apply not only on strings but on
symbols and argument names as well.
To set options on all atomic types at once see opts_atomic().
Usage
opts_character(
constructor = c("default"),
...,
trim = NULL,
fill = c("default", "rlang", "+", "...", "none"),
compress = TRUE,
unicode_representation = c("ascii", "latin", "character", "unicode"),
escape = FALSE
)
Arguments
constructor |
String. Method used to construct the object, often the name of a function. |
... |
Constructive options built with the |
trim |
|
fill |
String. Method to use to represent the trimmed elements. See |
compress |
Boolean. If |
unicode_representation |
By default "ascii", which means only ASCII characters
(code point < 128) will be used to construct strings and variable names. This makes sure that
homoglyphs (different spaces and other identically displayed unicode characters)
are printed differently, and avoid possible unfortunate copy and paste
auto conversion issues. "latin" is more lax and uses all latin characters
(code point < 256). "character" shows all characters, but not emojis. Finally
"unicode" displays all characters and emojis, which is what |
escape |
Boolean. Whether to escape double quotes and backslashes. If |
Value
An object of class <constructive_options/constructive_options_character>