#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#' Idea borrowed from \code{ggplot2::theme()}
#'
#' Use of this function negates having to define default values for all the
#' arguments in the parent function
#'
#' @param ... all arguments from call to parent function
#'
#' @return list with only arguments used in the call
#'
#' @importFrom utils modifyList
#' @noRd
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
find_args <- function (...) {
env <- parent.frame()
args <- names(formals(sys.function(sys.parent(1))))
vals <- mget(args, envir = env)
vals <- vals[!vapply(vals, function(x) {identical(x, quote(expr=))}, logical(1))]
modifyList(vals, list(..., ... = NULL))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.