new_pillar_shaft

0th

Percentile

Constructor for column data

The new_pillar_shaft() constructor creates objects of the "pillar_shaft" class. This is a virtual or abstract class, you must specify the subclass argument. By convention, this should be a string that starts with "pillar_shaft_". See vignette("extending", package = "tibble") for usage examples.

new_pillar_shaft_simple() provides an implementation of the pillar_shaft class suitable for output that has a fixed formatting, which will be truncated with a continuation character (ellipsis or ~) if it doesn't fit the available width. By default, the required width is computed from the natural width of the formatted argument.

Usage
new_pillar_shaft(x, ..., width, min_width = width, subclass)

new_pillar_shaft_simple(formatted, ..., width = NULL, align = "left", min_width = NULL, na_indent = 0L)

Arguments
x

An object

...

Additional attributes

width

The maximum column width.

min_width

The minimum allowed column width, width if omitted.

subclass

The name of the subclass.

formatted

An object coercible to character.

align

Alignment of the column.

na_indent

Indention of NA values.

Details

The formatted argument may also contain ANSI escapes to change color or other attributes of the text, see crayon.

Aliases
  • new_pillar_shaft
  • new_pillar_shaft_simple
Documentation reproduced from package pillar, version 1.3.0, License: GPL-3

Community examples

Looks like there are no examples yet.