Re: [R] an idiom to handle i'th element of a set of lists simultaneously

2009-06-23 Thread Rajarshi Guha
Thanks to all who replied. mapply does the trick On Tue, Jun 23, 2009 at 8:11 AM, Rajarshi Guha wrote: > Hi, I have 3 lists, x, y, z and I'd like to perform a calculation over all > the lists simultaneously. If it were a single list I could use lapply, but > for more than one list I'm using a for

Re: [R] an idiom to handle i'th element of a set of lists simultaneously

2009-06-23 Thread Ben Bolker
Henrique Dallazuanna wrote: > > If I understand, you can use rapply for this. > > Actually, I think you want mapply. -- View this message in context: http://www.nabble.com/an-idiom-to-handle-i%27th-element-of-a-set-of-lists-simultaneously-tp24164839p24165046.html Sent from the R help mai

Re: [R] an idiom to handle i'th element of a set of lists simultaneously

2009-06-23 Thread Henrique Dallazuanna
If I understand, you can use rapply for this. On Tue, Jun 23, 2009 at 9:11 AM, Rajarshi Guha wrote: > Hi, I have 3 lists, x, y, z and I'd like to perform a calculation over all > the lists simultaneously. If it were a single list I could use lapply, but > for more than one list I'm using a for lo

[R] an idiom to handle i'th element of a set of lists simultaneously

2009-06-23 Thread Rajarshi Guha
Hi, I have 3 lists, x, y, z and I'd like to perform a calculation over all the lists simultaneously. If it were a single list I could use lapply, but for more than one list I'm using a for loop. Is there an idiom that would let me use something like lapply, but the function specified to lappy would