makeup | R Documentation |
Formats numbers, strings or dates values for human use
makeup(
v,
sample = NULL,
format = NULL,
locale = NULL,
type = NULL,
suffix = "",
prefix = "",
si_prefix = FALSE
)
v |
value to be formatted |
sample |
human format to apply in v value |
format |
a character vector of date-time formats. Default is "%-m/%-d/%Y" |
locale |
locale to use, for example "es-MX" for mexican. See posible values at makeup::available_locales |
type |
kind of value to be formatted: ("num", "dat" or "chr") |
suffix |
Character string to append after formatted value |
prefix |
Character string to append before formatted value |
si_prefix |
A logical value indicating whether to use SI prefixes such as "k" and "M" to format the values. If |
a formatted character value
x <- c(1234.56, 432141, 0.12)
makeup(x, sample = "1'432.1")
makeup(x, sample = "1,432.1")
makeup(x, sample = "10.8", si_prefix = TRUE)
makeup(x, sample = "10%")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.