Re: [R] Sequential Sum in R

2011-12-06 Thread Jean V Adams
vioravis wrote on 12/06/2011 12:42:35 PM: > I am trying to code the following excel formula in R. > > ab cResultFormula > 1 10 0.1 #N/A > IF(B2<20,NA(),C2+IF(ISERROR(D1),0,D1)) > 2 20 0.2 0.2 > IF(B3<20,NA

[R] Sequential Sum in R

2011-12-06 Thread vioravis
I am trying to code the following excel formula in R. ab cResultFormula 1 10 0.1 #N/A IF(B2<20,NA(),C2+IF(ISERROR(D1),0,D1)) 2 20 0.2 0.2 IF(B3<20,NA(),C3+IF(ISERROR(D2),0,D2)) 3 30