#' add a column by reference
#'
#' @param x a data.table
#' @import data.table
#' @export
foo <- function(x){
x[, a := 1]
}
#' foo with call
#'
#' @param x a data.table
#' @export
fooCall <- function(x){
eval(substitute(x[, a :=1]),parent.frame(1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.