#' @noRd
get_function <- function(pkg, fun) {
if(!requireNamespace(pkg, quietly = TRUE)) {
stop(pkg, " package has not been installed", call. = FALSE)
}
eval(parse(text = paste0(pkg, "::", fun)))
}
#' @importFrom ggnewscale new_scale
#' @noRd
new_scales <- function(...) {
scales <- list(...)
if(length(scales) == 0)
return(NULL)
lapply(scales, new_scale)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.