- format
For label_date()
and label_time()
a date/time format
string using standard POSIX specification. See strptime()
for details.
For label_date_short()
a character vector of length 4 giving the format
components to use for year, month, day, and hour respectively.
- tz
a time zone name, see timezones()
. Defaults
to UTC
- locale
Locale to use when for day and month names. The default
uses the current locale. Setting this argument requires stringi, and you
can see a complete list of supported locales with
stringi::stri_locale_list()
.
- sep
Separator to use when combining date formats into a single string.
- leading
A string to replace leading zeroes with. Can be ""
to
disable leading characters or "\u2007"
for figure-spaces.
- unit
The unit used to interpret numeric input
- space
Add a space before the time unit?
- ...
Arguments passed on to number
accuracy
A number to round to. Use (e.g.) 0.01
to show 2 decimal
places of precision. If NULL
, the default, uses a heuristic that should
ensure breaks have the minimum number of digits needed to show the
difference between adjacent values.
Applied to rescaled data.
scale
A scaling factor: x
will be multiplied by scale
before
formatting. This is useful if the underlying data is very small or very
large.
prefix
Additional text to display before the number. The suffix is
applied to absolute value before style_positive
and style_negative
are
processed so that prefix = "$"
will yield (e.g.) -$1
and ($1)
.
suffix
Additional text to display after the number.
big.mark
Character used between every 3 digits to separate thousands.
The default (NULL
) retrieves the setting from the
number options.
decimal.mark
The character to be used to indicate the numeric
decimal point. The default (NULL
) retrieves the setting from the
number options.
style_positive
A string that determines the style of positive numbers:
"none"
(the default): no change, e.g. 1
.
"plus"
: preceded by +
, e.g. +1
.
"space"
: preceded by a Unicode "figure space", i.e., a space equally
as wide as a number or +
. Compared to "none"
, adding a figure space
can ensure numbers remain properly aligned when they are left- or
right-justified.
The default (NULL
) retrieves the setting from the
number options.
style_negative
A string that determines the style of negative numbers:
"hyphen"
(the default): preceded by a standard hyphen -
, e.g. -1
.
"minus"
, uses a proper Unicode minus symbol. This is a typographical
nicety that ensures -
aligns with the horizontal bar of the
the horizontal bar of +
.
"parens"
, wrapped in parentheses, e.g. (1)
.
The default (NULL
) retrieves the setting from the
number options.
trim
Logical, if FALSE
, values are right-justified to a common
width (see base::format()
).