Julian TszKin Chan
2010-Dec-07 04:24 UTC
[R] Is there any function can perform "outer lapply" ?
I built my own "outer lapply " as attached code. Is there any R build-in function can do the same jobs ? Thanks oapply<-function(X,Y,FUN, ..., MoreArgs = NULL, SIMPLIFY = TRUE, USE.NAMES = TRUE){ x=rep(X,each=length(X)) y=rep(Y,times=length(Y)) mapply(FUN,x,y, MoreArgs = MoreArgs, SIMPLIFY = SIMPLIFY, USE.NAMES = USE.NAMES) } Regards, Julian