Skip to content
Prev 303146 / 398503 Next

Alternating between "for loops"

Hello,

I'm not sure it works, but try the following.

for(j in which(dtp)){
   for (q in 1:N){
     if(y[q, j] %in% c("d", "D")) break
     [...etc...]

and in the other loop the same,

for (j in which(!dtp)) {
   for (q in 1:N) {
     if(y[q, j] %in% c("d", "D")) break
     [...etc...]


Em 10-08-2012 20:42, Claudia Penaloza escreveu: