Displaying 1 result from an estimated 1 matches for "td2341407".
2012 Feb 15
2
function similar to ddply? + calculations based on previous row
...n) ) = 1 and the according value of the row
below row n of test.f ==1. How can I do this without having to loop (which I
want to learn to avoid as much as possible). I tried to search on Rhelpforum
already and found:
http://r.789695.n4.nabble.com/How-to-calc-ratios-base-on-current-and-previous-row-td2341407.html
My n+1 is based on the original value so there is should be a solution
without looping but I don?t understand how I should index?
I?ll illustrate what I mean with a loop to solve this kind (different
script) of problems:
test[1,]<-ifelse(AAA[1,]>1,1,0)
for (t in 2:10)
{
test <- i...