new_pillar_shaft {pillar} | R Documentation |
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)
x |
An object |
... |
Additional attributes |
width |
The maximum column width. |
min_width |
The minimum allowed column width, |
subclass |
The name of the subclass. |
formatted |
An object coercible to character. |
align |
Alignment of the column. |
na_indent |
Indention of |
The formatted
argument may also contain ANSI escapes to change color
or other attributes of the text, see crayon.