Gabor Grothendieck wrote:
> 
> Try this:
> 
> z <- x * y[row(x) + col(x)]
> 

Thanks! yes, that's the ticket.

In testing out your solution, I noticed I described my problem wrongly. 

Apologies to anyone I confused.

So a clarification for anyone trying to follow this:

The index for y should have been y[i+j-1]

Gabor's solution is correct for the question as asked, and it works just
fine when I apply it to what I *should* have asked:

z <- x * y[row(x) + col(x) -1]

Glen

-- 
View this message in context: 
http://www.nabble.com/z-i%2Cj--%3D-x-i%2Cj--*-y%28i%2Bj%29---tp24731799p24732020.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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