gbp | R Documentation |
Formats a number, or list of numbers, into currency.
gbp(x, p = FALSE, char = TRUE)
x |
Monetary value, or list of values |
p |
Logical; if TRUE show value to nearest penny, cent etc. If FALSE show it to the nearest pound, dollar, euro etc. |
char |
Logical; if TRUE format the currency values into a character vector, with pretty printing, including comma separators for thousands, otherwise convert to rounded numeric values. |
If x is defined using the c() operator and contains one or more character elements, all elements of x will be coerced to characters, and this function will return "NA" for all elements. It is safer to define x as a list, in which all non-numeric elements will be translated to "NA".
A character vector with pretty formatted currency values (if
char
is TRUE), or a vector of rounded numeric values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.