Construct a custom pillar object
new_pillar()
is the low-level constructor for pillar objects.
It supports arbitrary components.
See pillar()
for the high-level constructor with default components.
new_pillar(components, ..., width = NULL, class = NULL)
components |
A named list of components constructed with |
... |
These dots are for future extensions and must be empty. |
width |
Default width, optional. |
class |
Name of subclass. |
Arbitrary components are supported.
If your tibble subclass needs more or different components in its pillars,
override or extend ctl_new_pillar()
and perhaps ctl_new_compound_pillar()
.
lines <- function(char = "-") { stopifnot(nchar(char) == 1) structure(char, class = "lines") } format.lines <- function(x, width, ...) { paste(rep(x, width), collapse = "") } new_pillar(list( title = pillar_component(new_ornament(c("abc", "de"), align = "right")), lines = new_pillar_component(list(lines("=")), width = 1) ))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.