Displaying 1 result from an estimated 1 matches for "tp3390017p3390017".
2011 Mar 19
3
How would you avoid loops in this simple example?
...atrix(1:12,P,M)
F <- matrix(1:8,N,P)
### Loop to avoid
for (i in 1:N) {for (m in 1:M) {for (p in 1:P) {
nu[i,m,p] <- Lambda[p,m] * F[i,p]
}}}
Any help is appreciated. Thanks.
--
View this message in context: http://r.789695.n4.nabble.com/How-would-you-avoid-loops-in-this-simple-example-tp3390017p3390017.html
Sent from the R help mailing list archive at Nabble.com.