[Rd] Curry: proposed new functional programming, er, function.
Byron Ellis
byron.ellis at gmail.com
Thu Nov 1 20:00:27 CET 2007
Hi all (especially R-core) I suppose,
With the introduction of the new functional programming functions into
base I thought I'd ask for a Curry() function. I use a simple one that
looks this:
Curry = function(FUN,...) { .orig = list(...);function(...)
do.call(FUN,c(.orig,list(...))) }
This comes in really handy when using say, heatmap():
heatmap(mydata,hclustfun=Curry(hclust,method="average"))
or other functions where there are ... arguments, but it's not clear
where they should end up.
--
Byron Ellis (byron.ellis at gmail.com)
"Oook" -- The Librarian
More information about the R-devel
mailing list