Suppose I have a function in my environment defined as follows:
abc <- function(x, a, b=23) { return(paste(x, a, b, sep=';')) }
I would like to get a reference to the above function by its name in the environment and be able to call it replacing its parameters. So an example:
> fun.abc <- get.fun.from.env('abc') #`fun.abc` should be the same as `abc` (above)
> x <- 123
> addl.params <- c(a=245, b=345)
> do.call(fun.abc, list(x, addl.params))
123;245;345
How would I implement this idea?
get("abc")? Just curious: why can't you useabcas function instead offun.abc?