Thanks to all who replied. mapply does the trick

On Tue, Jun 23, 2009 at 8:11 AM, Rajarshi Guha <rajarshi.g...@gmail.com>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 loop. Is there an idiom that would
> let me use something like lapply, but the function specified to lappy would
> have access to an element from each list? (In Python, I would have used for
> a,b,c in zip(x,y,z): ...)
>
> Thanks,
>
> --
> Rajarshi Guha
>



-- 
Rajarshi Guha

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to