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.
new_pillar_shaft(x, ..., width, min_width = width, subclass)new_pillar_shaft_simple(formatted, ..., width = NULL, align = "left",
min_width = NULL, na_indent = 0L)
An object
Additional attributes
The maximum column width.
The minimum allowed column width, width
if omitted.
The name of the subclass.
An object coercible to character.
Alignment of the column.
Indention of NA
values.
The formatted
argument may also contain ANSI escapes to change color
or other attributes of the text, see crayon.