Created
January 16, 2016 00:36
-
-
Save robertzk/0c18b40621a52ea4023b to your computer and use it in GitHub Desktop.
Example of function aliasing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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