diff --git a/R/label-bytes.R b/R/label-bytes.R index 261b365c..8fa805e6 100644 --- a/R/label-bytes.R +++ b/R/label-bytes.R @@ -13,7 +13,7 @@ #' * `auto_si` or `auto_binary` to automatically pick the most appropriate #' unit for each value. #' @inheritParams number_format -#' @param ... Other arguments passed on to [number()] +#' @inheritDotParams number #' @return A labeller function that takes a numeric vector of breaks and #' returns a character vector of labels. #' @export diff --git a/R/label-dollar.R b/R/label-dollar.R index e02c20f4..25485eaa 100644 --- a/R/label-dollar.R +++ b/R/label-dollar.R @@ -11,7 +11,7 @@ #' @param prefix,suffix Symbols to display before and after value. #' @param negative_parens `r lifecycle::badge("deprecated")` Use #' `style_negative = "parens"` instead. -#' @param ... Other arguments passed on to [base::format()]. +#' @inheritDotParams number #' @export #' @family labels for continuous scales #' @examples diff --git a/R/label-number-si.R b/R/label-number-si.R index 1e743763..087b5829 100644 --- a/R/label-number-si.R +++ b/R/label-number-si.R @@ -15,6 +15,7 @@ #' @param scale A scaling factor: `x` will be multiplied by `scale` before #' formatting. This is useful if the underlying data is already using an SI #' prefix. +#' @inheritDotParams label_number #' @export #' @family labels for continuous scales #' @family labels for log scales diff --git a/R/label-ordinal.R b/R/label-ordinal.R index 1a86858f..b9de36f4 100644 --- a/R/label-ordinal.R +++ b/R/label-ordinal.R @@ -9,7 +9,7 @@ #' Name gives suffix, and value specifies which numbers to match. #' @param gender Masculin or feminin gender for French ordinal. #' @param plural Plural or singular for French ordinal. -#' @param ... Other arguments passed on to [base::format()]. +#' @inheritDotParams number #' @export #' @family labels for continuous scales #' @examples diff --git a/R/label-percent.R b/R/label-percent.R index fdc64eb7..5e482d31 100644 --- a/R/label-percent.R +++ b/R/label-percent.R @@ -1,6 +1,7 @@ #' Label percentages (2.5%, 50%, etc) #' #' @inherit label_number return params +#' @inheritDotParams label_number #' @export #' @family labels for continuous scales #' @examples diff --git a/man/Range.Rd b/man/Range.Rd index f6aa766e..cd834a0a 100644 --- a/man/Range.Rd +++ b/man/Range.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/range.r +% Please edit documentation in R/range.R \name{Range} \alias{Range} \alias{DiscreteRange} diff --git a/man/alpha.Rd b/man/alpha.Rd index 8cc78b20..81b5b019 100644 --- a/man/alpha.Rd +++ b/man/alpha.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colour-manip.r +% Please edit documentation in R/colour-manip.R \name{alpha} \alias{alpha} \title{Modify colour transparency} diff --git a/man/area_pal.Rd b/man/area_pal.Rd index b10eacc2..2dc3184c 100644 --- a/man/area_pal.Rd +++ b/man/area_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-area.r +% Please edit documentation in R/pal-area.R \name{area_pal} \alias{area_pal} \alias{abs_area} diff --git a/man/asn_trans.Rd b/man/asn_trans.Rd index 22149435..8785c6b0 100644 --- a/man/asn_trans.Rd +++ b/man/asn_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-numeric.r +% Please edit documentation in R/trans-numeric.R \name{asn_trans} \alias{asn_trans} \title{Arc-sin square root transformation} diff --git a/man/atanh_trans.Rd b/man/atanh_trans.Rd index 2c9e225c..a0b9b78c 100644 --- a/man/atanh_trans.Rd +++ b/man/atanh_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-numeric.r +% Please edit documentation in R/trans-numeric.R \name{atanh_trans} \alias{atanh_trans} \title{Arc-tangent transformation} diff --git a/man/boxcox_trans.Rd b/man/boxcox_trans.Rd index 3a09006e..eed1d071 100644 --- a/man/boxcox_trans.Rd +++ b/man/boxcox_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-numeric.r +% Please edit documentation in R/trans-numeric.R \name{boxcox_trans} \alias{boxcox_trans} \alias{modulus_trans} diff --git a/man/breaks_extended.Rd b/man/breaks_extended.Rd index d3b10778..6e268749 100644 --- a/man/breaks_extended.Rd +++ b/man/breaks_extended.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/breaks.r +% Please edit documentation in R/breaks.R \name{breaks_extended} \alias{breaks_extended} \alias{extended_breaks} diff --git a/man/breaks_pretty.Rd b/man/breaks_pretty.Rd index 5a43a4c8..0f4a5c6e 100644 --- a/man/breaks_pretty.Rd +++ b/man/breaks_pretty.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/breaks.r +% Please edit documentation in R/breaks.R \name{breaks_pretty} \alias{breaks_pretty} \title{Pretty breaks for date/times} diff --git a/man/breaks_width.Rd b/man/breaks_width.Rd index 0fd96491..362df4b0 100644 --- a/man/breaks_width.Rd +++ b/man/breaks_width.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/breaks.r +% Please edit documentation in R/breaks.R \name{breaks_width} \alias{breaks_width} \title{Equally spaced breaks} diff --git a/man/brewer_pal.Rd b/man/brewer_pal.Rd index dde0d432..dd7e72be 100644 --- a/man/brewer_pal.Rd +++ b/man/brewer_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-brewer.r +% Please edit documentation in R/pal-brewer.R \name{brewer_pal} \alias{brewer_pal} \title{Colour Brewer palette (discrete)} diff --git a/man/col2hcl.Rd b/man/col2hcl.Rd index 2418b90b..bce3f580 100644 --- a/man/col2hcl.Rd +++ b/man/col2hcl.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colour-manip.r +% Please edit documentation in R/colour-manip.R \name{col2hcl} \alias{col2hcl} \title{Modify standard R colour in hcl colour space.} diff --git a/man/col_numeric.Rd b/man/col_numeric.Rd index 5578e150..077c3dce 100644 --- a/man/col_numeric.Rd +++ b/man/col_numeric.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colour-mapping.r +% Please edit documentation in R/colour-mapping.R \name{col_numeric} \alias{col_numeric} \alias{col_bin} diff --git a/man/comma.Rd b/man/comma.Rd index 0ae4fb5b..91b5f915 100644 --- a/man/comma.Rd +++ b/man/comma.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/label-number.r +% Please edit documentation in R/label-number.R \name{comma} \alias{comma} \alias{number_format} diff --git a/man/cscale.Rd b/man/cscale.Rd index 3702c08b..1c65f54d 100644 --- a/man/cscale.Rd +++ b/man/cscale.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/scale-continuous.r +% Please edit documentation in R/scale-continuous.R \name{cscale} \alias{cscale} \title{Continuous scale} diff --git a/man/date_trans.Rd b/man/date_trans.Rd index a52f4dca..6c110199 100644 --- a/man/date_trans.Rd +++ b/man/date_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-date.r +% Please edit documentation in R/trans-date.R \name{date_trans} \alias{date_trans} \title{Transformation for dates (class Date)} diff --git a/man/demo_continuous.Rd b/man/demo_continuous.Rd index d25ea8f5..94576fe3 100644 --- a/man/demo_continuous.Rd +++ b/man/demo_continuous.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.r +% Please edit documentation in R/utils.R \name{demo_continuous} \alias{demo_continuous} \alias{demo_log10} diff --git a/man/dichromat_pal.Rd b/man/dichromat_pal.Rd index e2b1fedc..e79862e7 100644 --- a/man/dichromat_pal.Rd +++ b/man/dichromat_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-dichromat.r +% Please edit documentation in R/pal-dichromat.R \name{dichromat_pal} \alias{dichromat_pal} \title{Dichromat (colour-blind) palette (discrete)} diff --git a/man/div_gradient_pal.Rd b/man/div_gradient_pal.Rd index da3910c1..33aaa41d 100644 --- a/man/div_gradient_pal.Rd +++ b/man/div_gradient_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-gradient.r +% Please edit documentation in R/pal-gradient.R \name{div_gradient_pal} \alias{div_gradient_pal} \title{Diverging colour gradient (continuous).} diff --git a/man/dscale.Rd b/man/dscale.Rd index f9ea380f..212253eb 100644 --- a/man/dscale.Rd +++ b/man/dscale.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/scale-discrete.r +% Please edit documentation in R/scale-discrete.R \name{dscale} \alias{dscale} \title{Discrete scale} diff --git a/man/exp_trans.Rd b/man/exp_trans.Rd index eca9f123..92f5b9e5 100644 --- a/man/exp_trans.Rd +++ b/man/exp_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-numeric.r +% Please edit documentation in R/trans-numeric.R \name{exp_trans} \alias{exp_trans} \title{Exponential transformation (inverse of log transformation)} diff --git a/man/expand_range.Rd b/man/expand_range.Rd index ea8ab467..c782cb6b 100644 --- a/man/expand_range.Rd +++ b/man/expand_range.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bounds.r +% Please edit documentation in R/bounds.R \name{expand_range} \alias{expand_range} \title{Expand a range with a multiplicative or additive constant} diff --git a/man/fullseq.Rd b/man/fullseq.Rd index e621d2b8..2e726bf4 100644 --- a/man/fullseq.Rd +++ b/man/fullseq.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/full-seq.r +% Please edit documentation in R/full-seq.R \name{fullseq} \alias{fullseq} \title{Generate sequence of fixed size intervals covering range.} diff --git a/man/gradient_n_pal.Rd b/man/gradient_n_pal.Rd index b560dd3e..7cbbefeb 100644 --- a/man/gradient_n_pal.Rd +++ b/man/gradient_n_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-gradient.r +% Please edit documentation in R/pal-gradient.R \name{gradient_n_pal} \alias{gradient_n_pal} \title{Arbitrary colour gradient palette (continuous)} diff --git a/man/grey_pal.Rd b/man/grey_pal.Rd index f9473115..7bd01256 100644 --- a/man/grey_pal.Rd +++ b/man/grey_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-grey.r +% Please edit documentation in R/pal-grey.R \name{grey_pal} \alias{grey_pal} \title{Grey scale palette (discrete)} diff --git a/man/hms_trans.Rd b/man/hms_trans.Rd index b4384dd2..e01bfa2a 100644 --- a/man/hms_trans.Rd +++ b/man/hms_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-date.r +% Please edit documentation in R/trans-date.R \name{hms_trans} \alias{hms_trans} \title{Transformation for times (class hms)} diff --git a/man/hue_pal.Rd b/man/hue_pal.Rd index 31de63ca..3abcd8bd 100644 --- a/man/hue_pal.Rd +++ b/man/hue_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-hue.r +% Please edit documentation in R/pal-hue.R \name{hue_pal} \alias{hue_pal} \title{Hue palette (discrete)} diff --git a/man/identity_pal.Rd b/man/identity_pal.Rd index 99a97668..028a6246 100644 --- a/man/identity_pal.Rd +++ b/man/identity_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-identity.r +% Please edit documentation in R/pal-identity.R \name{identity_pal} \alias{identity_pal} \title{Identity palette} diff --git a/man/identity_trans.Rd b/man/identity_trans.Rd index 5aa67c2e..efb88769 100644 --- a/man/identity_trans.Rd +++ b/man/identity_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-numeric.r +% Please edit documentation in R/trans-numeric.R \name{identity_trans} \alias{identity_trans} \title{Identity transformation (do nothing)} diff --git a/man/label_bytes.Rd b/man/label_bytes.Rd index 2ccca9ff..35120545 100644 --- a/man/label_bytes.Rd +++ b/man/label_bytes.Rd @@ -28,7 +28,44 @@ Applied to rescaled data.} formatting. This is useful if the underlying data is very small or very large.} -\item{...}{Other arguments passed on to \code{\link[=number]{number()}}} +\item{...}{ + Arguments passed on to \code{\link[=number]{number}} + \describe{ + \item{\code{prefix}}{Additional text to display before the number. The suffix is +applied to absolute value before \code{style_positive} and \code{style_negative} are +processed so that \code{prefix = "$"} will yield (e.g.) \verb{-$1} and \verb{($1)}.} + \item{\code{suffix}}{Additional text to display after the number.} + \item{\code{big.mark}}{Character used between every 3 digits to separate thousands.} + \item{\code{decimal.mark}}{The character to be used to indicate the numeric +decimal point.} + \item{\code{style_positive}}{A string that determines the style of positive numbers: +\itemize{ +\item \code{"none"} (the default): no change, e.g. \code{1}. +\item \code{"plus"}: preceded by \code{+}, e.g. \code{+1}. +}} + \item{\code{style_negative}}{A string that determines the style of negative numbers: +\itemize{ +\item \code{"hyphen"} (the default): preceded by a standard hypen \code{-}, e.g. \code{-1}. +\item \code{"minus"}, uses a proper Unicode minus symbol. This is a typographical +nicety that ensures \code{-} aligns with the horizontal bar of the +the horizontal bar of \code{+}. +\item \code{"parens"}, wrapped in parentheses, e.g. \code{(1)}. +}} + \item{\code{scale_cut}}{Named numeric vector that allows you to rescale large +(or small) numbers and add a prefix. Built-in helpers include: +\itemize{ +\item \code{cut_short_scale()}: [10^3, 10^6) = K, [10^6, 10^9) = M, [10^9, 10^12) = B, [10^12, Inf) = T. +\item \code{cut_long_scale()}: [10^3, 10^6) = K, [10^6, 10^12) = M, [10^12, 10^18) = B, [10^18, Inf) = T. +\item \code{cut_si(unit)}: uses standard SI units. +} + +If you supply a vector \code{c(a = 100, b = 1000)}, absolute values in the +range \verb{[0, 100)} will not be rescaled, absolute values in the range \verb{[100, 1000)} +will be divided by 100 and given the suffix "a", and absolute values in +the range \verb{[1000, Inf)} will be divided by 1000 and given the suffix "b".} + \item{\code{trim}}{Logical, if \code{FALSE}, values are right-justified to a common +width (see \code{\link[base:format]{base::format()}}).} + }} } \value{ A labeller function that takes a numeric vector of breaks and diff --git a/man/label_dollar.Rd b/man/label_dollar.Rd index 792299a2..ef5cee8b 100644 --- a/man/label_dollar.Rd +++ b/man/label_dollar.Rd @@ -40,7 +40,35 @@ width (see \code{\link[base:format]{base::format()}}).} \item{negative_parens}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Use \code{style_negative = "parens"} instead.} -\item{...}{Other arguments passed on to \code{\link[base:format]{base::format()}}.} +\item{...}{ + Arguments passed on to \code{\link[=number]{number}} + \describe{ + \item{\code{style_positive}}{A string that determines the style of positive numbers: +\itemize{ +\item \code{"none"} (the default): no change, e.g. \code{1}. +\item \code{"plus"}: preceded by \code{+}, e.g. \code{+1}. +}} + \item{\code{style_negative}}{A string that determines the style of negative numbers: +\itemize{ +\item \code{"hyphen"} (the default): preceded by a standard hypen \code{-}, e.g. \code{-1}. +\item \code{"minus"}, uses a proper Unicode minus symbol. This is a typographical +nicety that ensures \code{-} aligns with the horizontal bar of the +the horizontal bar of \code{+}. +\item \code{"parens"}, wrapped in parentheses, e.g. \code{(1)}. +}} + \item{\code{scale_cut}}{Named numeric vector that allows you to rescale large +(or small) numbers and add a prefix. Built-in helpers include: +\itemize{ +\item \code{cut_short_scale()}: [10^3, 10^6) = K, [10^6, 10^9) = M, [10^9, 10^12) = B, [10^12, Inf) = T. +\item \code{cut_long_scale()}: [10^3, 10^6) = K, [10^6, 10^12) = M, [10^12, 10^18) = B, [10^18, Inf) = T. +\item \code{cut_si(unit)}: uses standard SI units. +} + +If you supply a vector \code{c(a = 100, b = 1000)}, absolute values in the +range \verb{[0, 100)} will not be rescaled, absolute values in the range \verb{[100, 1000)} +will be divided by 100 and given the suffix "a", and absolute values in +the range \verb{[1000, Inf)} will be divided by 1000 and given the suffix "b".} + }} } \value{ All \code{label_()} functions return a "labelling" function, i.e. a function that diff --git a/man/label_number.Rd b/man/label_number.Rd index ac73acc1..5cdd0b18 100644 --- a/man/label_number.Rd +++ b/man/label_number.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/label-number.r +% Please edit documentation in R/label-number.R \name{label_number} \alias{label_number} \alias{label_comma} diff --git a/man/label_number_si.Rd b/man/label_number_si.Rd index 00e43db6..df2d0d57 100644 --- a/man/label_number_si.Rd +++ b/man/label_number_si.Rd @@ -22,7 +22,43 @@ prefix.} \item{suffix}{Additional text to display after the number.} -\item{...}{Other arguments passed on to \code{\link[base:format]{base::format()}}.} +\item{...}{ + Arguments passed on to \code{\link[=label_number]{label_number}} + \describe{ + \item{\code{prefix}}{Additional text to display before the number. The suffix is +applied to absolute value before \code{style_positive} and \code{style_negative} are +processed so that \code{prefix = "$"} will yield (e.g.) \verb{-$1} and \verb{($1)}.} + \item{\code{big.mark}}{Character used between every 3 digits to separate thousands.} + \item{\code{decimal.mark}}{The character to be used to indicate the numeric +decimal point.} + \item{\code{style_positive}}{A string that determines the style of positive numbers: +\itemize{ +\item \code{"none"} (the default): no change, e.g. \code{1}. +\item \code{"plus"}: preceded by \code{+}, e.g. \code{+1}. +}} + \item{\code{style_negative}}{A string that determines the style of negative numbers: +\itemize{ +\item \code{"hyphen"} (the default): preceded by a standard hypen \code{-}, e.g. \code{-1}. +\item \code{"minus"}, uses a proper Unicode minus symbol. This is a typographical +nicety that ensures \code{-} aligns with the horizontal bar of the +the horizontal bar of \code{+}. +\item \code{"parens"}, wrapped in parentheses, e.g. \code{(1)}. +}} + \item{\code{scale_cut}}{Named numeric vector that allows you to rescale large +(or small) numbers and add a prefix. Built-in helpers include: +\itemize{ +\item \code{cut_short_scale()}: [10^3, 10^6) = K, [10^6, 10^9) = M, [10^9, 10^12) = B, [10^12, Inf) = T. +\item \code{cut_long_scale()}: [10^3, 10^6) = K, [10^6, 10^12) = M, [10^12, 10^18) = B, [10^18, Inf) = T. +\item \code{cut_si(unit)}: uses standard SI units. +} + +If you supply a vector \code{c(a = 100, b = 1000)}, absolute values in the +range \verb{[0, 100)} will not be rescaled, absolute values in the range \verb{[100, 1000)} +will be divided by 100 and given the suffix "a", and absolute values in +the range \verb{[1000, Inf)} will be divided by 1000 and given the suffix "b".} + \item{\code{trim}}{Logical, if \code{FALSE}, values are right-justified to a common +width (see \code{\link[base:format]{base::format()}}).} + }} } \value{ All \code{label_()} functions return a "labelling" function, i.e. a function that diff --git a/man/label_ordinal.Rd b/man/label_ordinal.Rd index eb82bf23..68be92f5 100644 --- a/man/label_ordinal.Rd +++ b/man/label_ordinal.Rd @@ -29,7 +29,48 @@ ordinal_spanish() \item{rules}{Named list of regular expressions, matched in order. Name gives suffix, and value specifies which numbers to match.} -\item{...}{Other arguments passed on to \code{\link[base:format]{base::format()}}.} +\item{...}{ + Arguments passed on to \code{\link[=number]{number}} + \describe{ + \item{\code{accuracy}}{A number to round to. Use (e.g.) \code{0.01} to show 2 decimal +places of precision. If \code{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.} + \item{\code{scale}}{A scaling factor: \code{x} will be multiplied by \code{scale} before +formatting. This is useful if the underlying data is very small or very +large.} + \item{\code{decimal.mark}}{The character to be used to indicate the numeric +decimal point.} + \item{\code{style_positive}}{A string that determines the style of positive numbers: +\itemize{ +\item \code{"none"} (the default): no change, e.g. \code{1}. +\item \code{"plus"}: preceded by \code{+}, e.g. \code{+1}. +}} + \item{\code{style_negative}}{A string that determines the style of negative numbers: +\itemize{ +\item \code{"hyphen"} (the default): preceded by a standard hypen \code{-}, e.g. \code{-1}. +\item \code{"minus"}, uses a proper Unicode minus symbol. This is a typographical +nicety that ensures \code{-} aligns with the horizontal bar of the +the horizontal bar of \code{+}. +\item \code{"parens"}, wrapped in parentheses, e.g. \code{(1)}. +}} + \item{\code{scale_cut}}{Named numeric vector that allows you to rescale large +(or small) numbers and add a prefix. Built-in helpers include: +\itemize{ +\item \code{cut_short_scale()}: [10^3, 10^6) = K, [10^6, 10^9) = M, [10^9, 10^12) = B, [10^12, Inf) = T. +\item \code{cut_long_scale()}: [10^3, 10^6) = K, [10^6, 10^12) = M, [10^12, 10^18) = B, [10^18, Inf) = T. +\item \code{cut_si(unit)}: uses standard SI units. +} + +If you supply a vector \code{c(a = 100, b = 1000)}, absolute values in the +range \verb{[0, 100)} will not be rescaled, absolute values in the range \verb{[100, 1000)} +will be divided by 100 and given the suffix "a", and absolute values in +the range \verb{[1000, Inf)} will be divided by 1000 and given the suffix "b".} + \item{\code{trim}}{Logical, if \code{FALSE}, values are right-justified to a common +width (see \code{\link[base:format]{base::format()}}).} + }} \item{gender}{Masculin or feminin gender for French ordinal.} diff --git a/man/label_percent.Rd b/man/label_percent.Rd index a43662c9..ffb018ea 100644 --- a/man/label_percent.Rd +++ b/man/label_percent.Rd @@ -41,7 +41,35 @@ decimal point.} \item{trim}{Logical, if \code{FALSE}, values are right-justified to a common width (see \code{\link[base:format]{base::format()}}).} -\item{...}{Other arguments passed on to \code{\link[base:format]{base::format()}}.} +\item{...}{ + Arguments passed on to \code{\link[=label_number]{label_number}} + \describe{ + \item{\code{style_positive}}{A string that determines the style of positive numbers: +\itemize{ +\item \code{"none"} (the default): no change, e.g. \code{1}. +\item \code{"plus"}: preceded by \code{+}, e.g. \code{+1}. +}} + \item{\code{style_negative}}{A string that determines the style of negative numbers: +\itemize{ +\item \code{"hyphen"} (the default): preceded by a standard hypen \code{-}, e.g. \code{-1}. +\item \code{"minus"}, uses a proper Unicode minus symbol. This is a typographical +nicety that ensures \code{-} aligns with the horizontal bar of the +the horizontal bar of \code{+}. +\item \code{"parens"}, wrapped in parentheses, e.g. \code{(1)}. +}} + \item{\code{scale_cut}}{Named numeric vector that allows you to rescale large +(or small) numbers and add a prefix. Built-in helpers include: +\itemize{ +\item \code{cut_short_scale()}: [10^3, 10^6) = K, [10^6, 10^9) = M, [10^9, 10^12) = B, [10^12, Inf) = T. +\item \code{cut_long_scale()}: [10^3, 10^6) = K, [10^6, 10^12) = M, [10^12, 10^18) = B, [10^18, Inf) = T. +\item \code{cut_si(unit)}: uses standard SI units. +} + +If you supply a vector \code{c(a = 100, b = 1000)}, absolute values in the +range \verb{[0, 100)} will not be rescaled, absolute values in the range \verb{[100, 1000)} +will be divided by 100 and given the suffix "a", and absolute values in +the range \verb{[1000, Inf)} will be divided by 1000 and given the suffix "b".} + }} } \value{ All \code{label_()} functions return a "labelling" function, i.e. a function that diff --git a/man/linetype_pal.Rd b/man/linetype_pal.Rd index bf08538d..d4404b8f 100644 --- a/man/linetype_pal.Rd +++ b/man/linetype_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-linetype.r +% Please edit documentation in R/pal-linetype.R \name{linetype_pal} \alias{linetype_pal} \title{Line type palette (discrete)} diff --git a/man/log_trans.Rd b/man/log_trans.Rd index 3f9287fd..2e6619c6 100644 --- a/man/log_trans.Rd +++ b/man/log_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-numeric.r +% Please edit documentation in R/trans-numeric.R \name{log_trans} \alias{log_trans} \alias{log10_trans} diff --git a/man/manual_pal.Rd b/man/manual_pal.Rd index 73f937d0..b7ff407d 100644 --- a/man/manual_pal.Rd +++ b/man/manual_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-manual.r +% Please edit documentation in R/pal-manual.R \name{manual_pal} \alias{manual_pal} \title{Manual palette (discrete)} diff --git a/man/muted.Rd b/man/muted.Rd index 4f62de8f..f38e09c7 100644 --- a/man/muted.Rd +++ b/man/muted.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colour-manip.r +% Please edit documentation in R/colour-manip.R \name{muted} \alias{muted} \title{Mute standard colour} diff --git a/man/number.Rd b/man/number.Rd index a8fd5af8..e5f6554a 100644 --- a/man/number.Rd +++ b/man/number.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/label-number.r +% Please edit documentation in R/label-number.R \name{number} \alias{number} \alias{cut_short_scale} diff --git a/man/oob.Rd b/man/oob.Rd index 4e820a3d..db190b36 100644 --- a/man/oob.Rd +++ b/man/oob.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bounds.r +% Please edit documentation in R/bounds.R \name{oob} \alias{oob} \alias{oob_censor} diff --git a/man/pretty_breaks.Rd b/man/pretty_breaks.Rd index f617a2d0..8543c354 100644 --- a/man/pretty_breaks.Rd +++ b/man/pretty_breaks.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/breaks.r +% Please edit documentation in R/breaks.R \name{pretty_breaks} \alias{pretty_breaks} \title{Superseded interface to \code{breaks_pretty()}} diff --git a/man/probability_trans.Rd b/man/probability_trans.Rd index 5c9d29a0..67ca1771 100644 --- a/man/probability_trans.Rd +++ b/man/probability_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-numeric.r +% Please edit documentation in R/trans-numeric.R \name{probability_trans} \alias{probability_trans} \alias{logit_trans} diff --git a/man/reciprocal_trans.Rd b/man/reciprocal_trans.Rd index 2bcf32e7..aec21d60 100644 --- a/man/reciprocal_trans.Rd +++ b/man/reciprocal_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-numeric.r +% Please edit documentation in R/trans-numeric.R \name{reciprocal_trans} \alias{reciprocal_trans} \title{Reciprocal transformation} diff --git a/man/rescale.Rd b/man/rescale.Rd index 3ff52d54..1383eeea 100644 --- a/man/rescale.Rd +++ b/man/rescale.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bounds.r +% Please edit documentation in R/bounds.R \name{rescale} \alias{rescale} \alias{rescale.numeric} diff --git a/man/rescale_max.Rd b/man/rescale_max.Rd index 0677fc81..d9d0d080 100644 --- a/man/rescale_max.Rd +++ b/man/rescale_max.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bounds.r +% Please edit documentation in R/bounds.R \name{rescale_max} \alias{rescale_max} \title{Rescale numeric vector to have specified maximum} diff --git a/man/rescale_mid.Rd b/man/rescale_mid.Rd index 3000e57e..c9bf7392 100644 --- a/man/rescale_mid.Rd +++ b/man/rescale_mid.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bounds.r +% Please edit documentation in R/bounds.R \name{rescale_mid} \alias{rescale_mid} \alias{rescale_mid.numeric} diff --git a/man/rescale_none.Rd b/man/rescale_none.Rd index 746c615a..03fa60f1 100644 --- a/man/rescale_none.Rd +++ b/man/rescale_none.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bounds.r +% Please edit documentation in R/bounds.R \name{rescale_none} \alias{rescale_none} \title{Don't perform rescaling} diff --git a/man/rescale_pal.Rd b/man/rescale_pal.Rd index aeac61d3..7fa3a584 100644 --- a/man/rescale_pal.Rd +++ b/man/rescale_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-rescale.r +% Please edit documentation in R/pal-rescale.R \name{rescale_pal} \alias{rescale_pal} \title{Rescale palette (continuous)} diff --git a/man/reverse_trans.Rd b/man/reverse_trans.Rd index 77f38227..fa1b49ea 100644 --- a/man/reverse_trans.Rd +++ b/man/reverse_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-numeric.r +% Please edit documentation in R/trans-numeric.R \name{reverse_trans} \alias{reverse_trans} \title{Reverse transformation} diff --git a/man/seq_gradient_pal.Rd b/man/seq_gradient_pal.Rd index 15976d74..32973b3f 100644 --- a/man/seq_gradient_pal.Rd +++ b/man/seq_gradient_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-gradient.r +% Please edit documentation in R/pal-gradient.R \name{seq_gradient_pal} \alias{seq_gradient_pal} \title{Sequential colour gradient palette (continuous)} diff --git a/man/shape_pal.Rd b/man/shape_pal.Rd index cf74d4ce..a3c69ccc 100644 --- a/man/shape_pal.Rd +++ b/man/shape_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-shape.r +% Please edit documentation in R/pal-shape.R \name{shape_pal} \alias{shape_pal} \title{Shape palette (discrete)} diff --git a/man/show_col.Rd b/man/show_col.Rd index 5a2bdaf7..e51c00f1 100644 --- a/man/show_col.Rd +++ b/man/show_col.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colour-manip.r +% Please edit documentation in R/colour-manip.R \name{show_col} \alias{show_col} \title{Show colours} diff --git a/man/sqrt_trans.Rd b/man/sqrt_trans.Rd index 6137f8b9..f2695747 100644 --- a/man/sqrt_trans.Rd +++ b/man/sqrt_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-numeric.r +% Please edit documentation in R/trans-numeric.R \name{sqrt_trans} \alias{sqrt_trans} \title{Square-root transformation} diff --git a/man/time_trans.Rd b/man/time_trans.Rd index 37224014..8b473327 100644 --- a/man/time_trans.Rd +++ b/man/time_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-date.r +% Please edit documentation in R/trans-date.R \name{time_trans} \alias{time_trans} \title{Transformation for date-times (class POSIXt)} diff --git a/man/train_continuous.Rd b/man/train_continuous.Rd index 0703501f..ece41995 100644 --- a/man/train_continuous.Rd +++ b/man/train_continuous.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/scale-continuous.r +% Please edit documentation in R/scale-continuous.R \name{train_continuous} \alias{train_continuous} \title{Train (update) a continuous scale} diff --git a/man/train_discrete.Rd b/man/train_discrete.Rd index fd8ea115..073e1a2b 100644 --- a/man/train_discrete.Rd +++ b/man/train_discrete.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/scale-discrete.r +% Please edit documentation in R/scale-discrete.R \name{train_discrete} \alias{train_discrete} \title{Train (update) a discrete scale} diff --git a/man/trans_new.Rd b/man/trans_new.Rd index 00d59b0c..33c01e76 100644 --- a/man/trans_new.Rd +++ b/man/trans_new.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans.r +% Please edit documentation in R/trans.R \name{trans_new} \alias{trans_new} \alias{trans} diff --git a/man/trans_range.Rd b/man/trans_range.Rd index 8a05b00a..14363080 100644 --- a/man/trans_range.Rd +++ b/man/trans_range.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans.r +% Please edit documentation in R/trans.R \name{trans_range} \alias{trans_range} \title{Compute range of transformed values} diff --git a/man/viridis_pal.Rd b/man/viridis_pal.Rd index fa30ee1a..0fa20328 100644 --- a/man/viridis_pal.Rd +++ b/man/viridis_pal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/pal-viridis.r +% Please edit documentation in R/pal-viridis.R \name{viridis_pal} \alias{viridis_pal} \title{Viridis palette} diff --git a/man/yj_trans.Rd b/man/yj_trans.Rd index 3b18bbed..f129e416 100644 --- a/man/yj_trans.Rd +++ b/man/yj_trans.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/trans-numeric.r +% Please edit documentation in R/trans-numeric.R \name{yj_trans} \alias{yj_trans} \title{Yeo-Johnson transformation} diff --git a/man/zero_range.Rd b/man/zero_range.Rd index f0576301..f926cbe7 100644 --- a/man/zero_range.Rd +++ b/man/zero_range.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bounds.r +% Please edit documentation in R/bounds.R \name{zero_range} \alias{zero_range} \title{Determine if range of vector is close to zero, with a specified tolerance}