[R] Running totals

R. Michael Weylandt <michael.weylandt@gmail.com> michael.weylandt at gmail.com
Mon Nov 14 00:16:48 CET 2011


Table is not a regular data structure in R so I can't help further without a bit of clarification, but try ?cumsum and ?cbind. 

Michael 

On Nov 13, 2011, at 4:18 PM, Mark Carter <mcturra2000 at yahoo.co.uk> wrote:

> I have a table which looks like this:
> 
> � ACC������� BAL
> 1 hal -171245.33
> 2 opn� -50487.63
> 3 pga� 213440.38
> 4 prt������ 0.18
> 5 rbs��� 8292.54
> 
> How do I create a column which shows the running totals of the BAL columns?
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list