Here is my code
for(j in 1:423){
for(i in 1:18){
kh[j,i+1] <- kh[j,i] + kh[j,i+1]
if(kh[j,i+1]>kh$median[j]){break}}print(i+1)}
I don't know why this code won't work, yet this code works well:
for(i in 1:18){
kh[1,i+1] <- kh[1,i] + kh[1,i+1]
if(kh[1,i+1]>kh$median[1]){break}}
print(i+1)
I want to result about every J's (from 1 to 423) Please help me !