[R] Multiple lapply get-around

Liaw, Andy andy_liaw at merck.com
Mon Aug 30 14:06:53 CEST 2004

> From: Manoj - Hachibushu Capital
> I am faced with a situation wherein I have to use multiple 
> lapply's. The
> pseudo-code could be approximated to something as below:
> For each X from i=1 to n
> 	For each Y based on j=1 to m 
> 		For each F from 1 to f
> 			Do some calculation based on Fij
> 			Store Xi,Yj	= Fij

What does the line above mean?  Are you assigning the value of Fij to _both_
Xi and Yj?  Doesn't quite make sense to me...


> 		End For F
> 	End for Y
> End for X
> Is there anyway to optimize the processing logic further? I *guess*
> using the multiple lapply already optimizes the logic a little bit but
> is there anything else that could be done (apart from the obvious
> solution of writing a c-code)?
> Manoj
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html

More information about the R-help mailing list