specify_decimal <- function(x, k) format(round(x, k), nsmall=k)
round_df <- function(x, digits) {
# round all numeric variables
# x: data frame
# digits: number of digits to round
numeric_columns <- sapply(x, mode) == 'numeric'
x[numeric_columns] <- round(x[numeric_columns], digits)
x
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.