EVOLUTION-MANAGER
Edit File: format_glimpse.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: Format a vector for horizontal printing</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 format_glimpse {pillar}"><tr><td>format_glimpse {pillar}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Format a vector for horizontal printing</h2> <h3>Description</h3> <p><a href="https://lifecycle.r-lib.org/articles/stages.html#experimental"><img src="../help/figures/lifecycle-experimental.svg" alt='[Experimental]' /></a> </p> <p>This generic provides the logic for printing vectors in <code><a href="glimpse.html">glimpse()</a></code>. </p> <p>The output strives to be as unambiguous as possible, without compromising on readability. In a list, to distinguish between vectors and nested lists, the latter are surrounded by <code style="white-space: pre;">[]</code> brackets. Empty lists are shown as <code style="white-space: pre;">[]</code>. Vectors inside lists, of length not equal to one, are surrounded by <code style="white-space: pre;"><></code> angle brackets. Empty vectors are shown as <code style="white-space: pre;"><></code>. </p> <h3>Usage</h3> <pre> format_glimpse(x, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A vector.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Arguments passed to methods.</p> </td></tr> </table> <h3>Value</h3> <p>A character vector of the same length as <code>x</code>. </p> <h3>Examples</h3> <pre> format_glimpse(1:3) # Lists use [], vectors inside lists use <> format_glimpse(list(1:3)) format_glimpse(list(1, 2:3)) format_glimpse(list(list(1), list(2:3))) format_glimpse(list(as.list(1), as.list(2:3))) format_glimpse(list(character())) format_glimpse(list(NULL)) # Character strings are always quoted writeLines(format_glimpse(letters[1:3])) writeLines(format_glimpse(c("A", "B, C"))) # Factors are quoted only when needed writeLines(format_glimpse(factor(letters[1:3]))) writeLines(format_glimpse(factor(c("A", "B, C")))) </pre> <hr /><div style="text-align: center;">[Package <em>pillar</em> version 1.8.1 <a href="00Index.html">Index</a>]</div> </body></html>