.mcga <- function(tbl) {
x <- colnames(tbl)
x <- tolower(x)
x <- gsub("[[:punct:][:space:]]+", "_", x)
x <- gsub("_+", "_", x)
x <- gsub("(^_|_$)", "", x)
x <- gsub("^x_", "", x)
x <- make.unique(x, sep = "_")
colnames(tbl) <- x
tbl
}
to_num <- function(x) {
x <- gsub("%", "", x, fixed=TRUE)
x <- gsub(">", "", x, fixed=TRUE)
x <- gsub("<", "", x, fixed=TRUE)
x <- gsub(",", "", x, fixed=TRUE)
x <- gsub(" ", "", x, fixed=TRUE)
suppressWarnings(as.numeric(x))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.