assign_global <- function(x) {
# Assign a variable to the global environment,
# not simply the parent environment (as with <<-),
# with the same name
assign(
x = deparse(substitute(x)),
value = x,
envir = .GlobalEnv
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.