Skip to content
Prev 33038 / 398506 Next

little manipulation on data frame

I don't completely understand what you want, but might the following help?

 > cumsum(1:11)
  [1]  1  3  6 10 15 21 28 36 45 55 66
 > which(cumsum(1:11)>9)
[1]  4  5  6  7  8  9 10 11
 > which(cumsum(1:11)>9)[1]
[1] 4

hth.  spencer graves
N Dey wrote: