Re: [R] Selecting and multiplying

2011-09-06 Thread mdvaan
Anyone any idea on how to tackle this problem? Thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/Selecting-and-multiplying-tp3784901p3793908.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.or

[R] Selecting and multiplying

2011-09-01 Thread mdvaan
Hi, I have created two objects: object c contains yearly "distances" between cases and object g contains yearly interactions between cases. For each case and every year I would like to calculate the following value: Vit = sum(Dabt * Iait * Ibit) Where Vit is the value of case i in year t, Dabt i