I am struggling with R code optimization, a recurrent topic on this list.
I have three arrays, say A, B and C, all having the same number of columns.
I need to compute an array D whose generic element is
D[i, j, k] <- sum_n A[i, n]*B[j, n]*C[k, n]
Cycling over the three indices and subsetting the columns won't do. Is there
any way to implement this efficiently in R or should I resign to do this in
C?
Thanks,
Giuseppe
[[alternative HTML version deleted]]
______________________________________________
R-help@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide
http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.