Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of function aliasing
for (i in 1:10) {
assign(paste0("fn", i), eval(bquote(function(x) { x + .(i) })))
}
#' This is my function.
#'
#' This does stuff.
#'
#' @param x
#' @return foo.
fn1 <- force
#' @name fn2
#' @rdname fn1
NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment