EVOLUTION-MANAGER
Edit File: new_ornament.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Helper to define the contents of a pillar</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for new_ornament {pillar}"><tr><td>new_ornament {pillar}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Helper to define the contents of a pillar</h2> <h3>Description</h3> <p>This function is useful if your data renders differently depending on the available width. In this case, implement the <code><a href="pillar_shaft.html">pillar_shaft()</a></code> method for your class to return a subclass of "pillar_shaft" and have the <code><a href="../../base/html/format.html">format()</a></code> method for this subclass call <code>new_ornament()</code>. See the implementation of <code>pillar_shaft.numeric()</code> and <code>format.pillar_shaft_decimal()</code> for an example. </p> <h3>Usage</h3> <pre> new_ornament(x, width = NULL, align = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A character vector with formatting, can use ANYI styles e.g provided by the <span class="pkg">cli</span> package.</p> </td></tr> <tr valign="top"><td><code>width</code></td> <td> <p>An optional width of the resulting pillar, computed from <code>x</code> if missing</p> </td></tr> <tr valign="top"><td><code>align</code></td> <td> <p>Alignment, one of <code>"left"</code> or <code>"right"</code></p> </td></tr> </table> <h3>Examples</h3> <pre> new_ornament(c("abc", "de"), align = "right") </pre> <hr /><div style="text-align: center;">[Package <em>pillar</em> version 1.8.1 <a href="00Index.html">Index</a>]</div> </body></html>