new_pillar | R Documentation |
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, extra = deprecated())
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. |
extra |
Deprecated. |
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_pillar_list()
.
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)
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.