Skip to content

Instantly share code, notes, and snippets.

@robertzk
Created January 16, 2016 00:36
Show Gist options
  • Save robertzk/0c18b40621a52ea4023b to your computer and use it in GitHub Desktop.
Save robertzk/0c18b40621a52ea4023b to your computer and use it in GitHub Desktop.
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