Format numbers as main variables on the psychrometric chart.
Usage
label_drybulb(
accuracy = NULL,
scale = 1,
units,
big.mark = ",",
decimal.mark = ".",
trim = TRUE,
parse = FALSE,
...
)
label_humratio(
accuracy = NULL,
scale = 1,
units,
big.mark = ",",
decimal.mark = ".",
trim = TRUE,
parse = FALSE,
...
)
label_relhum(
accuracy = NULL,
scale = 1,
units,
big.mark = ",",
decimal.mark = ".",
trim = TRUE,
parse = FALSE,
...
)
label_wetbulb(
accuracy = NULL,
scale = 1,
units,
big.mark = ",",
decimal.mark = ".",
trim = TRUE,
parse = FALSE,
...
)
label_vappres(
accuracy = NULL,
scale = 1,
units,
big.mark = ",",
decimal.mark = ".",
trim = TRUE,
parse = FALSE,
...
)
label_specvol(
accuracy = NULL,
scale = 1,
units,
big.mark = ",",
decimal.mark = ".",
trim = TRUE,
parse = FALSE,
...
)
label_enthalpy(
accuracy = NULL,
scale = 1,
units,
big.mark = ",",
decimal.mark = ".",
trim = TRUE,
parse = FALSE,
...
)Arguments
- accuracy
A number to round to. Use (e.g.)
0.01to show 2 decimal places of precision. IfNULL, 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:
xwill be multiplied byscalebefore formatting. This is useful if the underlying data is very small or very large.- units
A single string indicating the unit system to use. Should be either
"SI"or"IP"- 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.- trim
Logical, if
FALSE, values are right-justified to a common width (seebase::format()).- parse
If
TRUE, the labels will be parsed into expressions and displayed as described in?plotmath. Default:FALSE.- ...
Other arguments passed on to
base::format().
Examples
demo_scale(10:50, labels = label_drybulb(units = "SI", parse = TRUE))
demo_scale(10:50, labels = label_drybulb(units = "IP", parse = TRUE))
demo_scale(10:20, labels = label_humratio(units = "SI", parse = TRUE))
demo_scale(70:140, labels = label_humratio(units = "IP", parse = TRUE))
demo_scale(seq(0.1, 0.5, by = 0.1), labels = label_relhum(units = "SI"))
demo_scale(seq(0.1, 0.5, by = 0.1), labels = label_relhum(units = "IP"))
demo_scale(10:50, labels = label_wetbulb(units = "SI", parse = TRUE))
demo_scale(10:50, labels = label_wetbulb(units = "IP", parse = TRUE))
demo_scale(10:50, labels = label_specvol(units = "SI", parse = TRUE))
demo_scale(10:50, labels = label_specvol(units = "IP", parse = TRUE))
demo_scale(10:50, labels = label_vappres(units = "SI"))
demo_scale(10:50, labels = label_vappres(units = "IP"))
demo_scale(seq(1000, 2000), labels = label_enthalpy(units = "SI", parse = TRUE))
demo_scale(seq(1000, 2000), labels = label_enthalpy(units = "IP", parse = TRUE))