| alignx_n | R Documentation |
Evaluate a numeric value and optionally perform roundx_n before
padding the decimal portion of the number to n digits. Note: this coverts the
numeric value to a character. The function is intended only for final display
purposes.
alignx_n(x, num_dec = 3, pad_char = " ", do_roundx_n = TRUE)
x |
numeric value to be right justified |
num_dec |
number of decimal places to justify |
pad_char |
padding character defaults to |
do_roundx_n |
logical to determine if |
character
library(curios)
cat(alignx_n(c(0.12345, 1.123344, 100.12345)), sep = "\n")
# Without \code{roundx_n}
cat(alignx_n(c(100.123, 100.23, 100.1), do_roundx_n = FALSE), sep = "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.