Hi,

How can we vectorize multiple for loops?

E.g. how do you vectorize this:

for (i in 1:10){
 for(j in 1:25){
  for(k in 1:19){
   x[i,j,k]=i*k-j
  }
 }
}

THanks
------------
KC

______________________________________________
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