new_ornament | R Documentation |
This function is useful if your data renders differently depending on the
available width. In this case, implement the pillar_shaft()
method for your
class to return a subclass of "pillar_shaft" and have the format()
method
for this subclass call new_ornament()
. See the implementation of
pillar_shaft.numeric()
and format.pillar_shaft_decimal()
for an example.
new_ornament(x, width = NULL, align = NULL)
x |
A character vector with formatting, can use ANYI styles e.g provided by the cli package. |
width |
An optional width of the resulting pillar, computed from |
align |
Alignment, one of |
new_ornament(c("abc", "de"), align = "right")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.