Skip to content

apply to multiple arrays simultaneously

2 messages · Liaw, Andy, Carlos Soares

#
Off the top of my head, seems like you can abind() the two together and then
run apply.  See the abind package on CRAN.

HTH,
Andy
------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments,...{{dropped}}
#
abind only allows one of the dimensions to be different. In may case 
they differ on several dimensions. For instance, in the example I gave 
(which was probably not clear enough), I would like
my.function to be called 3*4 times, each time being passed 2 matrices x 
and y with dim(x)=c(5,6) and dim(y)=c(7,8).

Anyway, thanks for the tip, Andy.
Carlos
Liaw, Andy wrote: