pretty.num <- function(x, p = 1) {
x <- ifelse(is.na(x), NA, prettyNum(round(x, p), big.mark = ","))
x
}
pretty.curr <- function(x, p = 0, curr = "£") {
x <- ifelse(is.na(x), NA, paste(curr, prettyNum(round(x, p), big.mark = ","), sep = " "))
x
}
pretty.perc <- function(x, p = 2) {
x <- ifelse(is.na(x), NA, paste(round(x*100, p), '%', sep = " "))
x
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.