# Assign inside dplyr chain
# http://jepusto.github.io/assigning-after-dplyr
# https://stackoverflow.com/questions/25975827
put <- function(x, name, where = NULL) {
name_string <- deparse(substitute(name))
if (is.null(where)) {
sys_calls <- sys.calls()
put_calls <- grepl("\\<put\\(", sys_calls) & !grepl("\\<put\\(\\.",sys_calls)
where <- sys.frame(max(which(put_calls)) - 1)
}
assign(name_string, value = x, pos = where)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.