#' de_var
#'
#' Convert a variable name in English to it's German equivalent - to be used with the seoneugelb package
#' @param x The input, could be a vector or a column
#' @export
de_var <- function(x) {
require(tidyverse)
if(x %in% c('ctr','clicks','impressions')) {
ifelse(x == 'ctr',str_to_upper(x),
ifelse(x == 'clicks','Klicks','Impressionen'))
} else {
stop('Bad variable - try again')
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.