format_units-deprecated | R Documentation |
This function is deprecated because it's a special case of the
format_numbers()
function. Users should finalize the manipulation of
units (using the units package) before invoking a formatdown function.
format_units(x, digits, unit, ..., unit_form, big_mark)
x |
Vector of class numeric or class units. |
digits |
Numeric scalar, a positive integer. Applied as the |
unit |
Character scalar, units label compatible with 'units' package.
For |
... |
Not used, force later arguments to be used by name. |
unit_form |
Character scalar. Possible values are "standard" (default)
and "implicit" (implicit exponent form). In standard form, units are
related with arithmetic symbols for multiplication, division, and powers,
e.g., |
big_mark |
Character. Applied as the |
Format a vector of numbers as character strings with measurement units appended via the 'units' package.
This function is a wrapper for units::as_units()
and base::format()
.
Numeric class input is converted to units class. Units class input, if
convertible, is converted to the specified measurement units; if none are
specified, the existing measurement units are retained. The result in all
cases is converted to class character using base::format()
with preset
arguments: trim = TRUE
and scientific = FALSE
. The output has the form
"a [u]"
, where a
is the number in decimal notation and u
is a
measurement units label.
A character vector of numbers with appended measurement units.
formatdown-deprecated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.