while(x<=21)
 {

   while(y<=rown)
   {
     n<-as.numeric(df[[y]][x]);
      if(n>0)
      {

        while(k<=lim)
        {

          k<-k+1;
        } # while loop for k closes

        opdf[[y]][x]<-sum;
      } # if statement closes

      y<-y+1;
} #while for y closes
   x<-x+1;
} #while with x closes


Have sent the code with matching brackets after confirming with what I am
using.

	[[alternative HTML version deleted]]

