[R] partially sum variable of a dataframe

markleeds at verizon.net markleeds at verizon.net
Wed Nov 7 18:02:29 CET 2007

There's probably a shorter way but below works
and doesn't require the starting points to be in
the a column.




>A stupid question:
>I have an array with two columns, the first "a" acting as my index in 0.25 steps, the second one "b" the column of interest. How can i sum up "b" only for a specified window in "a" (as the window command for time series)
>Sum up c if 3<a<5.25
>How to do that? thanks
>Psssst! Schon vom neuen GMX MultiMessenger gehört?
>Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
>R-help at r-project.org mailing list
>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