Hi all, I want to calculate in each row a ratio based on number in the current row and the previous row. Is there a way to do this without for-loops because that is extremely slow.
A B [1] 2 2 [2] 2 3 [3] 4 5,5 ... B2 = A2 + 0.5*B1 Thanks in advance. Best Marcus ______________________________________________ R-help@r-project.org 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.