R/options.R

#' Options in \{cards\}
#'
#' @name cards.options
#' @description
#' See below for options available in the \{cards\} package
#'
#' @section cards.round_type:
#' There are two types of rounding types in the \{cards\} package that are implemented
#' in `label_round()`, `alias_as_fmt_fun()`, and `apply_fmt_fun()` functions.
#'
#' - `'round-half-up'` (_default_): rounding method where values exactly halfway
#'    between two numbers are rounded to the larger in magnitude number.
#'    Rounding is implemented via [`round5()`].
#' - `'round-to-even'`: base R's default IEC 60559 rounding standard.
#'    See [`round()`] for details.
#'
#' To change the default rounding to use IEC 60559, this option must be set **both**
#' when the ARDs are created and when `apply_fmt_fun()` is run. This ensures that
#' any _default_ formatting functions created with `label_round()` utilize the
#' specified rounding method and the method is used what aliases are converted
#' into functions (which occurs in `apply_fmt_fun()` when it calls `alias_as_fmt_fun()`).
NULL

Try the cards package in your browser

Any scripts or data that you put into this service are public.

cards documentation built on Dec. 2, 2025, 9:07 a.m.