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 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.