EVOLUTION-MANAGER
Edit File: pretty_bytes.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: Bytes in a human readable string</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 pretty_bytes {prettyunits}"><tr><td>pretty_bytes {prettyunits}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Bytes in a human readable string</h2> <h3>Description</h3> <p>Use <code>pretty_bytes()</code> to format bytes. <code>compute_bytes()</code> is the underlying engine that may be useful for custom formatting. </p> <h3>Usage</h3> <pre> pretty_bytes(bytes, style = c("default", "nopad", "6")) compute_bytes(bytes, smallest_unit = "B") </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>bytes</code></td> <td> <p>Numeric vector, number of bytes.</p> </td></tr> <tr valign="top"><td><code>style</code></td> <td> <p>Formatting style: </p> <ul> <li> <p><code>"default"</code> is the original <code>pretty_bytes</code> formatting, and it always pads the output, so that all vector elements are of the same width, </p> </li> <li> <p><code>"nopad"</code> is similar, but does not pad the output, </p> </li> <li> <p><code>"6"</code> always uses 6 characters, The <code>"6"</code> style is useful if it is important that the output always has the same width (number of characters), e.g. in progress bars. See some examples below. </p> </li></ul> </td></tr> <tr valign="top"><td><code>smallest_unit</code></td> <td> <p>A character scalar, the smallest unit to use.</p> </td></tr> </table> <h3>Value</h3> <p>Character vector, the formatted sizes. For <code>compute_bytes</code>, a data frame with columns <code>amount</code>, <code>unit</code>, <code>negative</code>. </p> <h3>Examples</h3> <pre> bytes <- c(1337, 133337, 13333337, 1333333337, 133333333337) pretty_bytes(bytes) pretty_bytes(bytes, style = "nopad") pretty_bytes(bytes, style = "6") </pre> <hr /><div style="text-align: center;">[Package <em>prettyunits</em> version 1.1.1 <a href="00Index.html">Index</a>]</div> </body></html>