EVOLUTION-MANAGER
Edit File: pillar.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: Object for formatting a vector suitable for tabular display</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 pillar {pillar}"><tr><td>pillar {pillar}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Object for formatting a vector suitable for tabular display</h2> <h3>Description</h3> <p><code>pillar()</code> creates an object that formats a vector. The output uses one row for a title (if given), one row for the type, and <code>vec_size(x)</code> rows for the data. </p> <h3>Usage</h3> <pre> pillar(x, title = NULL, width = NULL, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A vector to format.</p> </td></tr> <tr valign="top"><td><code>title</code></td> <td> <p>An optional title for the column. The title will be used "as is", no quoting will be applied.</p> </td></tr> <tr valign="top"><td><code>width</code></td> <td> <p>Default width, optional.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Passed on to <code><a href="pillar_shaft.html">pillar_shaft()</a></code>.</p> </td></tr> </table> <h3>Details</h3> <p>A pillar consists of arbitrary components. The <code>pillar()</code> constructor uses <code>title</code>, <code>type</code>, and <code>data</code>. </p> <ul> <li> <p><code>title</code> via <code><a href="new_pillar_title.html">new_pillar_title()</a></code> </p> </li> <li> <p><code>type</code> via <code><a href="new_pillar_type.html">new_pillar_type()</a></code>, which calls <code><a href="type_sum.html">type_sum()</a></code> internally </p> </li> <li> <p><code>data</code> via <code><a href="pillar_shaft.html">pillar_shaft()</a></code> </p> </li></ul> <p>All components are formatted via <code><a href="../../base/html/format.html">format()</a></code> when displaying the pillar. A <code>width</code> argument is passed to each <code>format()</code> call. </p> <p>As of pillar 1.5.0, <code>pillar()</code> returns <code>NULL</code> if the width is insufficient to display the data. </p> <h3>Examples</h3> <pre> x <- 123456789 * (10^c(-1, -3, -5, NA, -8, -10)) pillar(x) pillar(-x) pillar(runif(10)) pillar(rcauchy(20)) # Special values are highlighted pillar(c(runif(5), NA, NaN, Inf, -Inf)) # Very wide ranges will be displayed in scientific format pillar(c(1e10, 1e-10), width = 20) pillar(c(1e10, 1e-10)) x <- c(FALSE, NA, FALSE, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE) pillar(x) x <- c("This is string is rather long", NA, "?", "Short") pillar(x) pillar(x, width = 30) pillar(x, width = 5) date <- as.Date("2017-05-15") pillar(date + c(1, NA, 3:5)) pillar(as.POSIXct(date) + c(30, NA, 600, 3600, 86400)) </pre> <hr /><div style="text-align: center;">[Package <em>pillar</em> version 1.8.1 <a href="00Index.html">Index</a>]</div> </body></html>