round_and_format
rounds and formats a numeric vector. This is useful for
providing output for tables or plots in a standardized format.
round_and_format(
x,
digits = 2,
sign_digits = NULL,
scientific = FALSE,
trim = TRUE
)
A numeric vector.
Number of decimal places.
Number of significant digits (if given this overrides
digits
).
logical: whether encoding should be in scientific notation or not.
logical: if leading blanks for justification to common width should be excluded or not.
Rounded and formatted values as characters.