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]]
______________________________________________
[email protected] 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.