Skip to contents

These options will be used on objects of type 'raw'.

Depending on constructor, we construct the object as follows:

  • "as.raw" (default): Use as.raw(), or raw() when relevant

  • "charToRaw" : Use charToRaw() on a string, if the a raw vector contains a zero we fall back to the "as.raw" constructor.

To set options on all atomic types at once see opts_atomic().

Usage

opts_raw(
  constructor = c("as.raw", "charToRaw"),
  ...,
  trim = NULL,
  fill = c("default", "rlang", "+", "...", "none"),
  compress = TRUE,
  representation = c("hexadecimal", "decimal")
)

Arguments

constructor

String. Name of the function used to construct the object.

...

Additional options used by user defined constructors through the opts object

trim

NULL or integerish. Maximum of elements showed before it's trimmed. Note that it will necessarily produce code that doesn't reproduce the input. This code will parse without failure but its evaluation might fail.

fill

String. Method to use to represent the trimmed elements. See ?opts_atomic

compress

Boolean. If TRUE instead of c() Use seq(), rep() when relevant to simplify the output.

representation

For "as.raw" constructor. Respectively generate output in the formats as.raw(0x10) or as.raw(16)

Value

An object of class <constructive_options/constructive_options_raw>