[R] more about outer

Erich Neuwirth erich.neuwirth at univie.ac.at
Sun Sep 23 17:16:46 CEST 2001


this is my current answer to my own question.
should we have such a funcion in a more general version
(i.e. with an arbitraty number of argument lists, for n-ary
functions)
in the core language?

myouter<-function(x,y,fun){
t(sapply(x,function(arg1) sapply(y,function(arg2) fun(arg1,arg2))))
}
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list