Skip to content
Back to formatted view

Raw Message

Message-ID: <AANLkTin3M+2w0S6sMOAVeDMrwT_x+0y7mPy78LLb+DWD@mail.gmail.com>
Date: 2010-12-07T04:24:30Z
From: Julian TszKin Chan
Subject: 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