[R] Loop with variable index
cvandy
cvandy26 at gmail.com
Wed Jan 30 20:58:53 CET 2008
I have a list of 20 values. The first time through a loop I want to find the
mean and stnd.dev. of the first two values; the second time through the loop
I want to find the mean and stnd. dev. of the first 3 values, etc. until
the last time through the loop I want to find the mean and stnd. dev. of all
20 values, so I end up with 19 means and stnd. deviations.
How would I construct such a loop?
Thanks.
--
View this message in context: http://www.nabble.com/Loop-with-variable-index-tp15190661p15190661.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list