#' @export
do_something <- function(thing, do.it = TRUE) {
# Get call
call <- match.call()
# Don't actually do anything for simplicity
something <- thing
# Create return object
out <- list(something = something)
# Add call
attr(out, "call") <- call
# Add class
class(out) <- "something"
return(out)
}
#' @export
getCall.something <- function(x, ...) {
return(attr(x, "call"))
}
#' @export
updating_function <- function(thing) {
update(thing, do.it = FALSE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.