Re: [R] Cumulative average

From: Albert Greinoecker <albert.greinoecker_at_uibk.ac.at>
Date: Thu, 22 May 2008 10:41:23 +0200

does e.g.
x <- c(8,5,4,2)
cumsum(x) / 1:length(x)
do what you need?
Albert

Am Mittwoch, den 21.05.2008, 20:36 -0500 schrieb Jacques Wagnor:
> Dear List,
>
> Does there exist a function that calculates a cumulative average?
> Neither running() from library(gregmisc) nor running.mean() from
> library(igraph) seems to be able to give a cumulative average.
>
> Any help or pointers would be greatly appreciated.
>
> Jacques
>
> ______________________________________________
> 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.



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. Received on Thu 22 May 2008 - 08:53:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 22 May 2008 - 10:30:39 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive